This is a simple Micro Frontend architecture demo built using Module Federation. It consists of two separate applications:
- Host (Shell): runs on port
1000
, namedapplication
- Remote (Provider): runs on port
1001
, namedcomponents
micro-frontend-demo/
βββ application/ # Host (container) app β PORT: 1000
βββ components/ # Remote app exposing components β PORT: 1001
- React 19.0.0
- TypeScript (ES2020)
Make sure you have Node.js (v16+) and npm installed.
cd components
npm install
npm run dev
This will start the remote app on http://localhost:1001
cd application
npm install
npm run dev
This will start the host app on http://localhost:1000
- The Host consumes components exposed by the Remote.
- Module Federation enables runtime sharing of React components between apps.
- Both apps must be running simultaneously for remote imports to work.