Note
v22.0.0-next.1 (Angular 22) is out and we are looking for feedback.
Please try it on a real project and tell us what breaks, what feels off, and what you would
like to see improved before 22.0.0 goes stable:
call for feedback, bug reports and improvements (#1124).
Important
Native Federation has moved to its own organization: github.com/native-federation.
This repository now only hosts the Module Federation packages. If you are looking for Native Federation, or want to upgrade from v3 to v4, head to native-federation/angular-adapter.
The deprecated Native Federation v3 sources for Angular 21 remain available on the
21.x.x backport
branch.
- Readme for Module Federation
- Migration guides
- Webpack Module Federation demo — a host and two remotes
running against the sources in
libs/
Test Library on external repository
If you want to test the modifications directly on your application, you can follow the steps:
-
Start the local registry Verdaccio:
npx nx run local-registry
-
Then you can publish the libraries by using:
npm run publish-local
This will first
buildthe libraries andpublishthem to http://localhost:4873 -
Then just re-run the
installon the other repo with you favorite package manager.
By default, the version from the package.json will be used. However, you can provide the version for a specific library by using:
npx nx run mf:publish-local -- --ver=22.0.1Publish Libraries
Follow these steps to publish all libraries on npm:
npm run publishThis will first build the libraries and publish them to npm registry.
By default, the version from the package.json will be used and the tag will be latest. However, you can provide the version and the tag for a specific library by using:
npx nx run mf:publish -- --ver=22.0.1 --tag=latest