new ModuleFederationPlugin({
name: ‘host’,
remotes: {
// test01: ‘test01@http://localhost:8081/test01.js’,
htim: ‘htim@…/im/entry.js’,
example: ‘example@…/example/entry.js’
},
shared: {
…dependencies
}
}),
new ModuleFederationPlugin({
name: ‘htim’,
filename: ‘entry.js’,
library: { type: ‘umd’, name: ‘htim’ },
exposes: { ‘./app’: ‘./src/bootstrap’},
shared: {
…dependencies
}
}),
optimization: {
// module federation - 用了chunks: all,出现上述错误
splitChunks: false,
// {
// chunks: ‘all’,
// minSize:100000,
// maxSize : 500000,
// },
},