Abhishek Chaturvedi
4 min readMay 26, 2021

--

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

--

--

Abhishek Chaturvedi

Technical Architect | Model | Actor | Photographer | Boxer