Replies: 3 comments 4 replies
-
Please provide a reproducible repository with code using github, single configuration is not enough because the problem is not reproducible, thank you |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just for the record, because I'm sure the officials won't fix it. The possible solutions (not verified):
|
Beta Was this translation helpful? Give feedback.
4 replies
-
Hello, I have the same scenario and am facing the same problem. Have you resolved it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
This is an example of using module federation for self-use.
This webpack configuration will output
app.js
,runtime.js
,mfeAAA.js
, and other unimportant JS files. The order they are included inindex.html
isruntime.js
,app.js
,mfeAAA.js
.The key points of this issue are:
runtime: 'single'
, andModuleFederationPlugin
has optionruntime: false
.runtime.js
andmfeAAA.js
internally registerwebpackJsonpCallback
.app.js
loaded, there is a callback__webpack_require__.O(0, ["npm.react","vendors......
,__webpack_require__
is from insidemfeAAA.js
, and it does not define `webpack_require.OWhat is the expected behavior?
Other relevant information:
webpack version: 5.95.0
Node.js version:
Operating System:
Additional tools:
Why would use self module federation?
In some micro-front-end scenarios,appA will be embedded in appB, and appB will use the module federation of appA
The above example is not realistic; module federation in Webpack will not have a configuration that uses itself. I'm referring to the situation where mfeAAA.js and runtime.js are loaded together at runtime
Beta Was this translation helpful? Give feedback.
All reactions