-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
externals @module-federation/webpack-bundler-runtime no work! #2539
Comments
You cannot exclude the @module-federation/webpack-bundler-runtime dependency via external because it is injected via template |
使用多个模块联邦的话会有性能问题! |
Bundler runtime is stateful I think. It's also quite small. You should look at externalizing the runtime package not the bundler runtime package. That's webpacks runtime code, you want that internalized. Bundler runtime used to be what was in webpacks MF1 runtime modules. Its webpack_require basically. |
got it,The runtime package has been externalized. I am considering whether it can also be externalized together to further reduce the size. |
I don't think so since it attaches itself to webpack and uses the context of the runtime. But I know we are looking at how to reduce the payload size / allow something like shared for the runtime so if someone has it, others won't load it. I believe we need to change some of our architecture to support this. But we are planning to look into it. |
nice! |
Describe the bug
externals: {
...
'@module-federation/webpack-bundler-runtime': 'MFWBR',
'@module-federation/webpack-bundler-runtime/constant': 'MFWBRCT',
...
},
Reproduction
...
Used Package Manager
pnpm
System Info
Validations
The text was updated successfully, but these errors were encountered: