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

A proper approach to front-end routing

Flex-Box CSS Property Notes

Learning to Code: Day 43 — Basic JavaScript Part 8

Interfaces In TypeScript

Refactoring following the principles “Tell, don’t ask” and “Fail Fast”.

Lessons Learned Building in Next.js

Making a multilingual site with Next.js — Part 1

Angular 4 Tutorial for absolute beginners — Part 1

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

Typescript: A guide for faster onboarding process

Using Replay to fix my first Replay bug

How we host a React component library on GitHub Packages