Webpack配置为“提供者”:
new ModuleFederationPlugin({
...
remotes: {
...
},
exposes: {
"./api-helpers": "./src/api-helpers",
"./menu-items": "./src/menu-items",
},
shared: {
...
},我要把这个放在消费者身上:

这与menu-items中的hiphen有关吗?
发布于 2022-03-26 11:49:28
我的使用者遥控器配置错误:
'store': 'store@http://localhost:4019/remoteEntry.js',
'api-helpers': 'store@http://localhost:4002/remoteEntry.js'将第二行更改为以下内容解决了问题。
'api-helpers': 'api-helpers@http://localhost:4002/remoteEntry.js'https://stackoverflow.com/questions/71624522
复制相似问题