Skip to content

Commit ebe7d89

Browse files
fix(enhanced): remove normal module replacement of runtime (#3652)
1 parent c880658 commit ebe7d89

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

.changeset/serious-rules-shake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
---
4+
5+
remove normal module replacement on federation runtime. rely on alias instead

packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -413,19 +413,6 @@ class FederationRuntimePlugin {
413413

414414
new HoistContainerReferences().apply(compiler);
415415

416-
const runtimePath = this.getRuntimeAlias(compiler);
417-
new compiler.webpack.NormalModuleReplacementPlugin(
418-
/@module-federation\/runtime/,
419-
(resolveData) => {
420-
if (/webpack-bundler-runtime/.test(resolveData.contextInfo.issuer)) {
421-
resolveData.request = runtimePath;
422-
423-
if (resolveData.createData) {
424-
resolveData.createData.request = resolveData.request;
425-
}
426-
}
427-
},
428-
).apply(compiler);
429416
// dont run multiple times on every apply()
430417
if (!onceForCompiler.has(compiler)) {
431418
this.prependEntry(compiler);

0 commit comments

Comments
 (0)