DEV Community

Discussion on: Micro Frontend in Angular: Using Module Federation

Collapse
 
mightyraj profile image
mightyraj

Hi, I read it fully and then implemented in same way of your approach,
But I run the application to got this error.

[webpack-dev-server] Live Reloading enabled.
styles.js:3322 Uncaught SyntaxError: Cannot use 'import.meta' outside a module
localhost/:1 Uncaught TypeError: Failed to resolve module specifier "mfe1@localhost:5000/mfe1remoteEntry.js". Relative references must start with either "/", "./", or "../".

Collapse
 
harostark profile image
Haroon Rasheed

Hi. I have the exact same issue. Were you able to sort it out? I also followed exactly the same thing but still this is the error at the end in console

Collapse
 
harostark profile image
Haroon Rasheed

Hi. I have just come up with the solution. You need to remove "mfe1@" from the URL of remotes in the webpack configuration of host. It is most probably because of newer version of angular