Issue cleared: #18119 (dynamic remote-entry loading with promise remotes where __webpack_require__.l could be missing).#20531
Conversation
|
|
|
|
@Santhoshkumargontla please sign CLA for making contribution |
|
CLA is now signed and EasyCLA check is passing. |
|
Could a maintainer please approve workflows so CI can run for this PR? |
Santhoshkumargontla
left a comment
There was a problem hiding this comment.
Could a maintainer please approve workflows so CI can run for this PR?
|
@Santhoshkumargontla Is it AI generated code? Please describe using your own words what do you change and why |
Fixes #18119.
Summary
This PR fixes a Module Federation runtime gap for promise-based remotes that reference
__webpack_require__.lto dynamically load remote entries.Previously,
externalType: "promise"did not always add the runtime requirement forloadScript, so__webpack_require__.lcould be undefined unless users forced runtime generation with workarounds (for example, importing a fake module).This change updates
ExternalModuleto detect__webpack_require__.lusage in promise externals and include theRuntimeGlobals.loadScriptruntime requirement automatically.What kind of change does this PR introduce?
Did you add tests for your changes?
Yes. Added a regression config case:
test/configCases/container/issue-18119/webpack.config.jstest/configCases/container/issue-18119/index.jsThe test validates that promise remotes can reference
__webpack_require__.land load successfully.Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?**
No documentation changes required.