Skip to content

Commit 5ab18dd

Browse files
committed
fix(mfe): expose container on window to avoid minifier rename
1 parent 1dabac0 commit 5ab18dd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

webpack/webpack.common.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ if (isMfeEnabled) {
423423
new ModuleFederationPlugin({
424424
name: mfeName,
425425
filename: 'remoteEntry.js',
426+
// Use a string-keyed global to avoid minifier mangling the container name
427+
// (e.g. `var projectA` -> `var A`), which breaks host loading.
428+
library: { type: 'window', name: mfeName },
426429
exposes: resolveExpose(),
427430
remotes,
428431
shared: {

0 commit comments

Comments
 (0)