-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Use alternative to ssrLoadModule
when Vite Environment API is enabled
#13008
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
Use alternative to ssrLoadModule
when Vite Environment API is enabled
#13008
Conversation
🦋 Changeset detectedLatest commit: 775ff0d The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Thanks for the PR!
I've got some further refactors, but I'll get those through as a separate PR to unblock this.
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
This adds an alternative to
ssrLoadModule
that is used when the Vite Environment API is enabled. This is needed because plugins, such as the Cloudflare Vite plugin, will override thessr
environment andssrLoadModule
will no longer function correctly.The method used here is to create an additional helper environment. This is a
RunnableDevEnvironment
by default and can therefore be used to import the module directly.I haven't added tests because I wasn't sure where/how but I can add them with some guidance.