user10970742
user10970742

Reputation:

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

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

Upvotes: 3

Views: 2271

Answers (1)

user10970742
user10970742

Reputation:

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",
  }
}),

Upvotes: 5

Related Questions