In the article Introducing Module Federation, a demo is used to demonstrate the various concepts discussed. The following branch contains the code driving that demo for those who wish to see this code in action.
Install NX with npm via npm install -g nx
- To build all the applications, run
yarn serve --all
- To build the Host application and one specific application, run
yarn serve --apps=application-1
- To only the Host application, run
yarn serve
- To only build a specific mico-app, run
yarn serve --apps=application-1 --appOnly
- nx build host --skip-nx-cache --showFileNames=true --skipMin=true
- nx build application-1 --skip-nx-cache --showFileNames=true --skipMin=true
- nx build application-2 --skip-nx-cache --showFileNames=true --skipMin=true
- npm run local-server
- Run the
nx serve design-system
command - Open
http://127.0.0.1:4444/
in your browser
- Make a change somewhere in the code
- Run the
nx affected:apps
ornx affected:libs
command
- Make a change somewhere in the code
- Run the
nx affected:dep-graph
command
- Make a change somewhere in the code
- Run the
nx affected --target=lint
command