-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: integrate vite runtime #155
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…into fix-vite-node-ssr-optimizeDeps
hi-ogawa
force-pushed
the
refactor-vite-runtime
branch
2 times, most recently
from
January 21, 2024 01:47
ea37af2
to
385dc74
Compare
hi-ogawa
force-pushed
the
refactor-vite-runtime
branch
2 times, most recently
from
February 1, 2024 00:21
9246184
to
322c69e
Compare
hi-ogawa
commented
Feb 9, 2024
@@ -12,6 +12,7 @@ export default defineConfig({ | |||
"react/jsx-dev-runtime", | |||
"react-dom", | |||
"react-dom/server.browser", | |||
"@remix-run/server-runtime", |
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.
Previously vite-node
was providing exports
etc... in global, so it was magically working.
Now, vite-runtime doesn't provide these out-of-the-box, so we get this error unless cookie
etc... are pre-bundled.
ReferenceError: exports is not defined
at /home/hiroshi/code/personal/vite-plugins/node_modules/.pnpm/[email protected]/node_modules/cookie/index.js:15:1
at Object.runViteModule (__vite_node_miniflare_entry.js:2704:15)
at ViteRuntime.directRequest (__vite_node_miniflare_entry.js:2609:23)
at ViteRuntime.cachedRequest (__vite_node_miniflare_entry.js:2489:28)
at request (__vite_node_miniflare_entry.js:2539:19)
at /@fs/home/hiroshi/code/personal/vite-plugins/node_modules/.pnpm/@[email protected][email protected]/node_modules/@remix-run/server-runtime/dist/esm/cookies.js?v=83897ad1:1:110
at Object.runViteModule (__vite_node_miniflare_entry.js:2704:9)
at ViteRuntime.directRequest (__vite_node_miniflare_entry.js:2609:5)
at ViteRuntime.cachedRequest (__vite_node_miniflare_entry.js:2492:33)
at /@fs/home/hiroshi/code/personal/vite-plugins/node_modules/.pnpm/@[email protected][email protected]/node_modules/@remix-run/server-runtime/dist/esm/index.js?v=83897ad1:1:110
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
todo
ssrFixStacktraceimport.meta.hot
only on "web" module but not on "ssr" module? (so server is simple module tree invalidation towards entrypoint like before)vite-plugin-simple-hmr
#157ViteDevServer.moduleGraph.invalidateModule
won't invalidateViteRuntime.moduleCache
automatically (unless "full-reload" is accompanied with such virtual module invalidation by frameworks)