This is a demo project to showcase the ability of module federation with a variety of micro frontends.
Have a particular look at the following files:
readme.md: Shows how to install dependencies and how to start the exampleprojects\mfe1\webpack.config.js: Microfrontend configprojects\mfe2\webpack.config.js: Microfrontend configprojects\shell\webpack.config.js: Shell configprojects\shell\src\app\app.routes.ts: Lazy route for microfrontendprojects\shell\src\decl.d.ts: Typing for mapped Url pointing to microfrontend
Run the following command to install the required packages
npm i
To start the applications:
- Start Micro Frontends (remote):
ng serve mfe1 -oandng serve mfe2 -o - Start Shell (host):
ng serve shell -o - Make sure
mfe1and/ormfe2is started beforeshellis loaded into the browser - Use the hyperlink
flightsin theshellto loadmfe1
* Please note, you must use yarn during the beta phase of CLI 11 b/c it allows to override dependencies to force the CLI into webpack 5.
Have a look at this article series about Module Federation