This repo showcases an example MFE setup using Nx.
It consists of four apps:
- Launcher (host)
- Todo (remote)
- Notes (remote)
- Login (remote)
The Launcher is a host application and loads the remote applications into it using Module Federation.
The Login application stores state about the user that is then shared between the Launcher and Notes applications. This is done automatically via Nx's withModuleFederation
helper.
To run the example, follow the steps below:
- Clone the repository
- Run
npm install
- Run
nx serve-mfe static-host
- Navigate a browser to
http://localhost:4200
To find out more about Nx's Micro Frontend support, visit https://nx.dev/micro-frontends/setup-mfe-with-angular.