This app is a simple example of how to create a dynamic micro frontend architecture using React and Webpack Module Federation.
It contains 3 different frontends:
consumer
: The main app that consumes the other frontends.producer-a
: A simple frontend that exports a componentmodule-a
.producer-b
: A simple frontend that exports a componentmodule-b
.
- Install dependencies in each app folder:
npm install
- build and preview the producer apps producer-a and producer-b:
npm run build && npm run preview
- build and start the consumer app:
npm run dev
- Open your browser at the displayed URL and you should see the consumer app consuming the producer apps.