-
Notifications
You must be signed in to change notification settings - Fork 274
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
Move Vite plugins to their new home #1935
Conversation
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
…tead of remix-oxygen
* Use Remix presets for virtual routes * Pin oxygen-cli dependency to fix installation * Avoid adding virtual routes in build * Wrap virtual routes in virtual root * Omit user root when rendering virtual routes * Move buildDirectory to preset and use it in projects * Update tests
@wizardlyhel This is a bug in Remix that we fixed already: remix-run/remix#9194 Should be out in the next release but maybe I should silence this error in the meantime 🤔 -- It's only related to critical CSS for the subrequest profiler, so not very important. Hidden in 48f54be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh okay! I would prefer to silence this error if we can until the next Remix release with fix. Otherwise, it's confusing for those encounter this error when they first run npm run dev
Other than that, this PR is working fine for me
I'm reverting #1939 here due to errors in subdependencies. |
This PR stabilizes our Vite plugins and moves them to their respective packages.
Originally, we were adding DX utilities (subrequest profiler, graphiql, etc.) directly in our CLI because the classic Remix compiler did not offer much flexibility.
When we released the experimental Vite integration, these utilities were adjusted to work with Vite but were still all in the CLI for the sake of velocity.
In this PR, these features are now migrated to the Vite plugins so that we stop using most of our hacky code around Remix to make them work.
Changes:
hydrogen()
plugin to@shopify/hydrogen/vite
. Vite is an optional peer dependency of this package now.oxygen()
plugin to@shopify/mini-oxygen/vite
, which now contains all the workerd integration.@shopify/remix-oxygen
for/subrequest-profiler
. The new code is directly added in the Hydrogen plugin.