Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate the v3_routeConfig future flag for Remix. #2722

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

seanparsons
Copy link

WHY are these changes introduced?

These changes are to support an upgrade to the next version of Remix, by using the future flag and supporting libraries to get the code ready for that upgrade in place before the upgrade itself happens.

WHAT is this pull request doing?

  • Added the v3_routeConfig flag set to true.
  • Created a hydrogen.v3preset function which excludes the routes attribute that the hydrogen.preset function includes because that is incompatible with the flag being turned on.
  • Added a hydrogenRoutes function which transforms the route specified in routes.ts to include the virtual routes.
  • Rewrote getVirtualRoutes to work without using any node libraries so that it can run in MiniOxygen.
  • Updated the example projects to have them use the flag and the changes necessary to use the flag.

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Jan 23, 2025

Oxygen deployed a preview of your refactor/v3_routeconfig_flag branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 5:08 PM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 5:08 PM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 5:08 PM
classic-remix - (Logs) - Inspect deployment January 23, 2025 5:08 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 5:08 PM

Learn more about Hydrogen's GitHub integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant