-
-
Notifications
You must be signed in to change notification settings - Fork 191
refactor(rsc): remove server optimizeDeps.include in favor of cjs module runner transform
#692
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
base: main
Are you sure you want to change the base?
refactor(rsc): remove server optimizeDeps.include in favor of cjs module runner transform
#692
Conversation
This reverts commit 238e832.
optimizeDeps.include in favor of cjs module runner transform
…into 08-11-refactor_rsc_remove_server_optimizedeps.include
|
We should try ecosystem ci (Waku and react-router). If it's fine, we should go forward. |
|
One concern is we might want this with |
|
Cloudflare plugin tries to optimize everything by default and it seems to cause an issue. To prevent this, users now need |
| rsc: { | ||
| optimizeDeps: { | ||
| exclude: ['react-router'], | ||
| exclude: ['react-router', 'react', 'react-dom'], |
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.
This is unfortunate, but necessary anyways since react 3rd party libraries with potential "use client" cannot be optimized.
Description
After #687, this should work in principle. If not, we should improve cjs module runner transform.
TODO
defaultimport interop fix(rsc): fix cjs default import on module runner #695test-provider-in-server-depinpackages/plugin-rsc/examples/basic/src/routes/deps/client-in-server/server.tsxis broken. it looks like dual module of@vitejs/test-dep-client-in-server2/client.?v=won't be added to anymore, which breaksclient-in-server-package-proxydetection logic.isInNodeModuleinstead of?v=fix(rsc): replace?v=check with more robustnode_modulesdetection #696