Conversation
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
…ports should be removed
|
/snapit |
|
🫰✨ Thanks @balazsbajorics! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/cli-hydrogen": "0.0.0-snapshot-20250519200352",
"@shopify/hydrogen": "0.0.0-snapshot-20250519200352",
"@shopify/remix-oxygen": "0.0.0-snapshot-20250519200352"
|
|
/snapit |
|
🫰✨ Thanks @balazsbajorics! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/cli-hydrogen": "0.0.0-snapshot-20250520122031",
"@shopify/hydrogen": "0.0.0-snapshot-20250520122031",
"@shopify/remix-oxygen": "0.0.0-snapshot-20250520122031"
|
| /.mf | ||
| .env | ||
| .shopify | ||
| .react-router |
There was a problem hiding this comment.
note to self: have a cursor rule telling the AI that this is now a react-router project, and not a @remix-run/react project.
|
"Follow this document" Why isn’t the migration document publicly accessible if we’re supposed to follow it? |
|
@michael-land apologies for that, we have since turned that document into a blog post that has been published. I've updated the link to point to https://hydrogen.shopify.dev/update/how-to-adopt-all-future-flags |
* checkpoint: hydrogen lib is pulling in RR7 and types are fixed * Update plugin.ts * Update vite.config.ts * gitignore and eslint ignore changes * checkpoint: the skeleton is semi-updated, typecheck runs, npm run dev fails * stripping sharedOptions.remixConfig from the hydrogen vite plugin * updating remix-oxygen * remove the classic compiler option from hydrogen-cli * removing the classic remix example * removing the classic-remix example leftovers * checkpoint: CLI builds but the tests fail * fix json syntax error in skeleton tsconfig.json * changing all examples package jsons to match the skeleton * fixing typo * fixing two false detections of classic projects * removing @remix-run/fs-routes from root package.json * do I need react-router-dom in the skeleton too? * pruning remix-config.ts in cli * fixing tsconfig of cli * fixing types of hydrogen Pagination.ts * pruning exports from remix-oxygen/index.ts – note: all of these re-exports should be removed * removing outdated reference to @remix-run/server-runtime here * removing no-longer applicable remix-run reference * type fix in hydrogen / VariantSelector.ts * Update package-lock.json * updating ALL of the examples to React Router 7 via codemod * Update entry.server.tsx * it seems like the skeleton's build directory should be 'dist' according to CLI tests * _temporarily_ adding react-router-dom to the root package. this should be weeded out * respect HYDROGEN_DISABLE_VIRTUAL_ROUTES in hydrogenRoutes * prettier change * the auto-upgrade now ALSO works with react router * fixing build * CLI: temporarily skipping typecheck test * Update collections.$handle.tsx * fixing botched merge * running Prettier on package.json * adding this vite config v6 fix, just in case... but maybe we will remove this * oh god * a few more remix-runs * Update Footer.tsx * codegen now runs react-router typegen * removing react-router typegen from the typecheck command * Update package.json * fixing types in examples/express * skeleton env.d.ts refers to react-router now * fixing skeleton type errors * fixing examples/express/env.d.ts * fixing all the env.d.ts 'es * adding these env.d.ts es to fix the remaining example tsc failures * Update package-lock.json * Snapit: adding @shopify/remix-oxygen to the forced changeset * adding back three re-exported types from react-router * Update codegen.ts * adding .react-router to the skeleton gitignore * undo root .gitignore changes * react-router codegen supports watch flag now * reformatting codegen.ts * TODO BEFORE MERGE remove ALL references to legacy-runtime * fixing a few react-router imports * const REMIX_COMPILER_ERROR_MESSAGE * removing react-router and react-router-dom from the root dependencies * regenerated package-lock.json from the main baseline * Revert "regenerated package-lock.json from the main baseline" This reverts commit e5b074f. * Revert "removing react-router and react-router-dom from the root dependencies" This reverts commit 28fc65e. * pinning react-router to 7.6.0 * adding a changeset * adding cursor rule with hydrogen upgrade instructions * Update package-lock.json * simplifying skeleton's virtual import * Update thick-tigers-grab.md * removing all references to legacy-runtime * Update dev.env.d.ts * Update env.d.ts * scrubbing more references to legacyRuntime * whooops * re-enabling createContentSecurityPolicy example * try removing the HYDROGEN_DISABLE_VIRTUAL_ROUTES fix * will this test pass now, maybe? * removing two TODO BEFORE MERGEs as they are done! * removing remix-oxygen/src/implementations.ts * what happens if we only change the relevant parts in the vite.config.ts? * Delete upgrade-hydrogen-react-router-7-2025.5.0.mdc * Major version bumping libraries that now depend on react-router@7 * renaming remixBuild to reactRouterBuild

If you want to try upgrading your Hydrogen Project to React Router 7:
Make sure you are on Hydrogen 2025.1.4 with all Remix Future Flags turned on! Make sure your storefront runs fine and commit all changes before proceeding.
Follow this guide if you haven’t turned on your future flags yet: Hydrogen future flag migration for React Router 7
Run
npx codemod remix/2/react-router/upgrade– don't worry, after the codemod your project will not be ready yet, we have a few more steps to do:Add
react-router.config.tsfile with these contents:vite.config.tsdelete all parameters of thereactRouter()plugin. These are just leftovers that the codemod did not clean up.env.d.ts: the declare module should be aimed atreact-routerand you have to addLoaderFunctionArgsandActionFunctionArgs(reference file here)".react-router/types/**/*"to include, and add"rootDirs": [".", "./.react-router/types"]reference file HERE{ "include": [ "./**/*.d.ts", "./**/*.ts", "./**/*.tsx", + ".react-router/types/**/*" ], "compilerOptions": { + "rootDirs": [".", "./.react-router/types"], "lib": [ ...Add
.react-routerto the.gitignorefileNow try running
npm run codegenandnpm run typecheckandnpm run dev!