plugins: [
new ModuleFederationPlugin({
name: "project1",
filename: "entry.js", // it has the meta description of all the stuff that app exports
remotes: {
entry: "project2@http://localhost:3002/entry.js", // Also include the path in Project 1
},
exposes: {
"./CoolWidget": "./src/CoolWidget"
},
shared: {'react', 'react-dom', 'WIDGET-LIBRARY' }, // all thh dependencies
}),

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store