Module Federation (Unexpected token '!==' main.js:619)

Viewed 1319

When I try to get a remote container and show it component on the web page I got an error - Unexpected token '!==' main.js:619 . I tried to update some packages related with webpack, but it isn't help. Had anyone this problem or knows how to resolve it?

I leave the my code here

enter image description here

1 Answers

I found the issue inside the webpack core, after a lot of times of investigation. It accepts the remote address that contains remote container name and server full path.

new ModuleFederationPlugin({
  remotes: {
    home: "home@http://localhost:3001/remoteEntry.js",
    nav: "nav@http://localhost:3003/remoteEntry.js",
  }
}),
Related