This project demonstrates the implementation of a micro-frontend architecture using React and Next.js. It's based on a tutorial by Harsh Patel on DEV Community. The project is structured into three separate Next.js applications, showcasing module federation and component sharing.
- Node.js (version specified in the tutorial)
- Next.js v10.2 or later
- Clone the repository.
- Navigate to each micro-frontend directory (
fe1
,fe2
,fe3
). - Run
bun install
to install dependencies.
- Start each micro-frontend separately using
bun run dev
. - Access the applications on their respective ports as configured.
fe1
: Contains a Header component.fe2
: Exposes a common utility function.fe3
: Consumes components and functions fromfe1
andfe2
.
- Module Federation in Webpack 5.
- Component sharing across different micro-frontends.
- Dynamic code loading in a micro-frontend architecture.
Feel free to contribute to this project by submitting pull requests or opening issues for any bugs or feature enhancements.
MIT License. See license for details.
Thanks to Harsh Patel and the DEV Community for the original tutorial.