We are using the webpack feature called Module Federation to make micro frontends. To make it possible, we are configuring the ModuleFederationPlugin
plugin in the webpack.config file of each application:
- Host: webpack.config.js (declaring remote modules)
- First MFE: webpack.config.js (exposing remote module)
- Second MFE: webpack.config.js (exposing remote module)
To run this host application and MFEs you need to first install dependencies for all of them:
npm run install:all
Then you can run the host application and the two MFEs to be loaded:
npm run serve
npm run serve:first-mfe
npm run serve:second-mfe