module-federation-examples
module-federation-examples copied to clipboard
externals @module-federation/webpack-bundler-runtime no work
externals:{
// work
'@module-federation/runtime': 'GLobalLib.MFRuntime',
'@module-federation/sdk': 'GLobalLib.MFSDK',
// no work
'@module-federation/webpack-bundler-runtime': 'GLobalLib.MFWPR',
'@module-federation/webpack-bundler-runtime/constant': 'GLobalLib.MFWPR_CONSTANT'
}
It cant be external, it IS webpack runtime. Making it external pretty much deletes all the federation runtime module code.
bundler runtime is what RuntimeModule binds to, it use to be inside the webpack runtime. So it cant be external
You also cannot share this across other instances. We rely on require.federation.bundlerRuntime - this has to be 1 per runtime, if you try to share it - it will break other things as it cannot share instances