Webpack config for 'provider':
new ModuleFederationPlugin({
...
remotes: {
...
},
exposes: {
"./api-helpers": "./src/api-helpers",
"./menu-items": "./src/menu-items",
},
shared: {
...
},
I am getting this on the consumer:
Is this related to the hiphen in menu-items
?
CodePudding user response:
My consumer remotes were incorrectly configured:
'store': 'store@http://localhost:4019/remoteEntry.js',
'api-helpers': 'store@http://localhost:4002/remoteEntry.js'
Changing the second line to the following fixed the issue.
'api-helpers': 'api-helpers@http://localhost:4002/remoteEntry.js'