Skip to content

Drop Remix Compiler#2941

Merged
balazsbajorics merged 7 commits intomainfrom
bb-cli-drop-remix-compiler
May 19, 2025
Merged

Drop Remix Compiler#2941
balazsbajorics merged 7 commits intomainfrom
bb-cli-drop-remix-compiler

Conversation

@balazsbajorics
Copy link
Copy Markdown
Contributor

@balazsbajorics balazsbajorics commented May 19, 2025

This PR is a preparation step for the React Router 7 migration.

WHY are these changes introduced?

The Hydrogen CLI contains code for supporting the legacy Remix Compiler. As we are about to migrate to React Router 7, this code will imminently start breaking. Since we do not plan to have a dual-track support for both Remix 2 and React Router 7, in preparation of fully switching over to React Router 7, I am removing the Remix Compiler support code.

WHAT is this pull request doing?

  • All legacy-runtime and classic-compiler references have been deleted
  • the classic-remix example has been deleted
  • Every place which would switch logic based on detecting Vite vs Remix Compiler has been changed so that if Vite is not found, we throw an error saying "Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'"

HOW to test your changes?

  • Test it with a classic Remix Compiler project, and make sure you see the error message
  • in all other cases, the CLI should work as it does today.

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

@shopify
Copy link
Copy Markdown
Contributor

shopify bot commented May 19, 2025

Oxygen deployed a preview of your bb-cli-drop-remix-compiler branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment May 19, 2025 4:18 PM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment May 19, 2025 4:18 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment May 19, 2025 4:18 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment May 19, 2025 4:18 PM

Learn more about Hydrogen's GitHub integration.

@balazsbajorics balazsbajorics marked this pull request as ready for review May 19, 2025 12:17
@github-actions

This comment has been minimized.

Comment on lines +18 to +20
export const REMIX_COMPILER_ERROR_MESSAGE =
"Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems an odd place to put this, but I can't find a better alternative...

@balazsbajorics
Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions
Copy link
Copy Markdown
Contributor

🫰✨ Thanks @balazsbajorics! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/cli-hydrogen": "0.0.0-snapshot-20250519155503",
"@shopify/hydrogen": "0.0.0-snapshot-20250519155503",
"@shopify/remix-oxygen": "0.0.0-snapshot-20250519155503"

Create a new project with all the released packages running npm create @shopify/hydrogen@<snapshot_version>
To try a new CLI plugin version, add @shopify/cli-hydrogen as a dependency to your project using the snapshot version.

"@shopify/cli-hydrogen": patch
---

Removing support for the legacy Remix Compiler. Please upgrade to Vite by running 'npx shopify hydrogen setup vite'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a major correct? It will be bundled inside the shopify cli, making them also ship a major.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes. agreed!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines +223 to +226
process.env.HYDROGEN_DISABLE_VIRTUAL_ROUTES = disableVirtualRoutes
? 'true'
: undefined;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this added for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh this is leftover. deleting!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@balazsbajorics
Copy link
Copy Markdown
Contributor Author

all right, finally managed to test it manually!

image

@balazsbajorics balazsbajorics merged commit 593aabf into main May 19, 2025
11 checks passed
@balazsbajorics balazsbajorics deleted the bb-cli-drop-remix-compiler branch May 19, 2025 19:24
@frandiox
Copy link
Copy Markdown
Contributor

Wohoooooo! 🔥

juanpprieto pushed a commit that referenced this pull request Sep 17, 2025
* drop Remix Compiler from cli

* remove classic-remix example

* Update package-lock.json

* adding changeset

* a major bump!!

* deleting leftover HYDROGEN_DISABLE_VIRTUAL_ROUTES code
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.

4 participants