-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Module Federation] collision between modules of differents remotes. #5308
Comments
For maintainers only:
|
Please update webpack to the latest version |
It's already 5.50.0. I missed a « 0 » in my post, corrected. |
@alexander-akait I don't understand why it is labelled as "question". I really think it is a bug. Can you explain ? Maybe it is part of the process. |
Because we have a lot of tests for module federation and most likely there is no bug here, only but no one has looked yet, it is in my todo |
Are you sure reproducible test repo works fine? |
It was answered a lot of time: https://github.com/penguintree/webpack-module-federation-module-cache-issue/blob/main/remote-package-1/package.json#L2 Webpack generates runtime based on |
@chenxsan @snitin315 Let's add this problem to https://webpack.js.org/concepts/module-federation/#troubleshooting |
Yes the error is the symptom. The function |
Change name in |
Thanks a lot. |
In theory you can create shared remotes between different builds, it is very exotic, but it is possible |
I ran in this issue while exploring how I could handle different remote packages version in a rather large federated application. I didn't found a lot of information about remote versioning apart from a video from Jack Herrington based on unpkg. Is there any official guidelines or documentation you are aware of about this ? |
I think better to open another issue about this and ask directly questions, so we will improve this, module federation is real big theme, so there are a lot of complex information |
despite the fact that it has been answered many times - it was this answer of yours that helped me. Thank you) |
Bug report
What is the current behavior?
A host consumes two different remotes.
Both remotes have the same file structure, i.e. both exposes
./src/main.js
under different names.remote package 1 :
remote package 2 :
host :
In the host app, when using both federated modules, the first one overrides the second.
If the current behavior is a bug, please provide the steps to reproduce.
This repository reproduces the bug.
What is the expected behavior?
Both modules from both remotes should be loaded independently, as the similarities in the exposed file name is merely a coincidence and is not known by the host.
Other relevant information:
webpack version: 5.50.0
Node.js version: 14.17.0
Operating System: Windows 10 20H2 19042.1110
Additional tools: n/a
The text was updated successfully, but these errors were encountered: