The code in this repo is the literal copy of code that follows the Module Federation Quick Start Guide
There are two Micro Frontend apps in this repo; namely the Producer (mfe2) and the Consumer (mfe1).
Since the Producer should be live before the Consumer attempts to load it on the root Host app, we start the Producer first and then the Consumer. Follow this order:
- Starting the Producer via CLI at root of project: $
(cd mfe2; pnpm run dev) - Starting the Consumer via at root of project: $
(cd mfe1; pnpm run dev) - Click on the starting URLs provided by the Command Line output
Altenatively use the Makefile dev target if your local setup is configured for use of make commands.
$make devuses parallel execution to start up both of the Micro Frontends.
Or if you prefer to start each individually, these Make targets are available as well.
$make dev-mfe2will start up (just) the Producer.$make dev-mfe1will start up (just) the Host.