I am trying to consume an MFE using webpack 5, module federation with angular 13. However when I run the application I am getting below error.
Uncaught SyntaxError: Unexpected token ':'
Error occurring with the below code in webpack.config
new ModuleFederationPlugin({
name: "shell",
filename: "remoteEntry.js",
remotes: {
MfeAccount: "https://account-mfexyz.com/remoteEntry.js"
},
})
To me everything looks good, but still application not able to access remote MFE, and throwing error.
Please assist.
While mentioning remotes in ModuleFederationPlugin, You do not have to mention name and filename. Put like this:
})