DEV Community

Discussion on: How to Build a Micro Frontend with Webpack's Module Federation Plugin

Collapse
 
paniraj2010 profile image
Paniraj2010 • Edited

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: "account-mfexyz.com/remoteEntry.js"
},
})

To me everything looks good, but still application not able to access remote MFE, and throwing error. Uncaught SyntaxError: Unexpected token ':'

Please assist.