-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Build compiles but imports break when using optimization.splitChunks.chunks = 'all' with Module Federation #5332
Comments
I had to explicitly set this to be able to load the remote: rsbuild
otherwise the resulting |
Coming back to this it even became worse for me. Now I am only able to load the remote by specifying |
@Gillibald i just left the whole |
This issue is caused by a conflict between webpack and chunk split with federation. To resolve this, you can use |
Thanks a lot. This fixes my issue. How can I achieve this with a pure |
@Gillibald would you please try out rsbuild 0.4.0 cc @chenjiahan |
I still need to specify:
otherwise, the Tested with:
|
@Gillibald are you using the moduleFederation.options config? |
rsbuild.config.ts
rsbuild.config.mf.ts
|
I am not using options here but I am manually adding the plugin so this might cause issues. Update: Using this
instead of
Fixes the issue for me |
Yes using the rsbuild built-in capability allows to patch is accordingly so chunk split does not collide |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
bump |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Should be fixed when i port hoisted runtime to rust |
System Info
System:
OS: macOS 13.6.3
CPU: (8) arm64 Apple M1 Pro
Memory: 100.59 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.6.0 - ~/Library/Caches/fnm_multishells/85041_1705309080052/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/85041_1705309080052/bin/yarn
npm: 8.13.2 - ~/Library/Caches/fnm_multishells/85041_1705309080052/bin/npm
Browsers:
Chrome: 120.0.6099.216
Safari: 17.2.1
Details
Add the following config in a module federation project, and the projects will compile, but the imports break in the actual app.
optimization: { splitChunks: { chunks: 'all' } }
As discussed with @ahabhgk and @ScriptedAlchemy, opening this issue to keep track of future solutions
Reproduce link
No response
Reproduce Steps
yarn dev
with the config mentioned in any project with Module FederationThe text was updated successfully, but these errors were encountered: