-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
add option to exclude shared dependencies from build #2795
Comments
you can set |
{ import: false } means shared will not be bundled into dist |
@2heal1 I tried it, not work, still |
+1 |
react-lib is a chunk group. It includes react, react-dom, react/jsx-runtime, schedular. Youd need to look through the chunks contents and make them all external. react-lib is just a name, might not even have react in it if you look closer |
pluginReact({splitChunks: {react: false, router: false}}) or something like that. Will disable the react chunk group entirely |
You can try writing a Webpack plugin,like this:
|
Clear and concise description of the problem
I use rsbuild for building, and want to minimize my remote module size,
so I don't want shared dependencies generated on remotes as I can load it from my host.
I tried these config in rsbuild.config.ts:
but where I run
rsbuild build
, shared react is still generated at:dist\static\js\async\lib-react.e00de504.js
Suggested solution
add
ModuleFederationPluginOptions
options:Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: