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

--

--

--

Technical Architect | Model | Actor | Photographer | Boxer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Write Your First Redux-Saga

A functional approach to className management in ReactJS, Part II

Building a UI Component in 2017 and Beyond

Day16 of #100DaysOfCode

Sorting algorithms in JavaScript

Testing in React with Jest and Enzyme: An Introduction

How to start a TailwindCSS project with SCSS

The benefits of continuous integration and how it changed jExperience testing

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
Abhishek Chaturvedi

Abhishek Chaturvedi

Technical Architect | Model | Actor | Photographer | Boxer

More from Medium

Manage code quality and static code check in any big javascript project| Set right governance for…

Code Quality — Real Test

Building create-react-app template with Typescript, Yarn, Eslint, Prettier combo in vscode 🤝

Testing a HTTP Error Handler Utility Hook

How to Replace Webpack in Create React App With esbuild