Angular Adapter

Applies to

The Angular adapter for Native Federation — a builder, schematics and runtime helpers that integrate Angular's esbuild-based ApplicationBuilder with the Native Federation core.

The Angular adapter — published as @angular-architects/native-federation from Angular 22 onward (and as @angular-architects/native-federation-v4 on Angular 20/21) — is the first-class integration between Angular's esbuild-based @angular/build:application and the Native Federation core. It ships a builder that wraps the Angular CLI, schematics that scaffold hosts and remotes, an Nx generator, and a small set of Angular-aware config and runtime helpers.

This section covers the v4 Angular adapter (Angular 20+). The examples use the Angular 22 package name @angular-architects/native-federation; on Angular 20/21 the identical adapter is published as @angular-architects/native-federation-v4 (substitute -v4 throughout). For a full overview of what changed since v3 — packages, ESM, Angular version support — see v3 vs v4.

Try the playground — runnable hosts, remotes and SSR examples on GitHub: native-federation/playground.

What's in the Box

PieceEntry pointPurpose
Builder@angular-architects/native-federation:buildReplaces the default Angular build/serve target. Wraps @angular/build:application, runs the federation build, and proxies federation artifacts through the dev-server.
Schematicsng add @angular-architects/native-federationInitializes a project as a host, dynamic-host or remote — patches angular.json, polyfills, main.ts and creates federation.config.mjs. Also ships update-v4, appbuilder and remove.
Config helpers@angular-architects/native-federation/configwithNativeFederation, share, shareAll, shareAngularLocales, NG_SKIP_LIST — Angular-aware wrappers around the core config helpers.
Runtime helpers@angular-architects/native-federationProvides initFederation and a (deprecated) top-level loadRemoteModule that bridge to the orchestrator runtime, plus re-exported domain types. The generated main.ts wires the orchestrator by default — see Runtime.
Nx generator@angular-architects/native-federation:native-federationAdds a Nx library project pre-wired to the federation builder.
Internal API@angular-architects/native-federation/internalExposes runBuilder for users who need to inject custom esbuild plugins. See Custom Builder.

Why an Adapter?

The core builder is intentionally framework- and bundler-agnostic. The Angular adapter adds the glue that an Angular project needs:

In this Section

Versioning

The adapter follows Angular's major versions: 22.x targets Angular 22.x, 21.x targets Angular 21.x, 20.1.x targets Angular 20.1, and so on. Pin the same major as your Angular CLI.

The package name depends on your Angular version. From Angular 22 the v4 adapter is published under its original name, @angular-architects/native-federation (22.x). On Angular 20/21 the same adapter ships as @angular-architects/native-federation-v4. The runtime semantics, config and builder API are identical — only the package name differs.

Example repositories

Prerequisites