Skip to content

Instantly share code, notes, and snippets.

@rogerluiz
Created August 20, 2020 16:46
Show Gist options
  • Select an option

  • Save rogerluiz/8348b17e7a4b8497d1b55806f205d7b7 to your computer and use it in GitHub Desktop.

Select an option

Save rogerluiz/8348b17e7a4b8497d1b55806f205d7b7 to your computer and use it in GitHub Desktop.
new ModuleFederationPlugin({
name: "app1",
library: { type: "var", name: "app1" },
filename: "remoteEntry.js",
exposes: {
"./Widget": "./src/Widget",
},
shared: {
react: {
import: "react",
shareKey: "react",
shareScope: "default",
singleton: true,
},
"react-dom": {
singleton: true,
},
"react-router-dom": {
singleton: true,
},
"styled-components": {
singleton: true,
}
},
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment