Angular Adapter

Applies to

The Angular adapter — published as @angular-architects/native-federation-v4 during the v4 beta (it will revert to @angular-architects/native-federation once stable) — 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+, currently in beta as @angular-architects/native-federation-v4). For a full overview of what changed since v3 — packages, ESM, Angular version support — see v3 vs v4.

Try the Angular playground

Runnable hosts, remotes and SSR examples on GitHub — clone and experiment locally.

Open on GitHub →

What's in the Box

Piece Entry point Purpose
Builder @angular-architects/native-federation-v4:build Replaces the default Angular build/serve target. Wraps @angular/build:application, runs the federation build, and proxies federation artifacts through the dev-server.
Schematics ng add @angular-architects/native-federation-v4 Initializes 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-v4/config withNativeFederation, share, shareAll, shareAngularLocales, NG_SKIP_LIST — Angular-aware wrappers around the core config helpers.
Runtime re-exports @angular-architects/native-federation-v4 Re-exports initFederation, loadRemoteModule (and related types) from @softarc/native-federation-runtime for ergonomic import when using the classic runtime. The generated main.ts wires the orchestrator by default — see Runtime.
Nx generator @angular-architects/native-federation-v4:native-federation Adds a Nx library project pre-wired to the federation builder.
Internal API @angular-architects/native-federation-v4/internal Exposes 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: 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 v4 generation is published under @angular-architects/native-federation-v4 while it stabilises. Once it lands as the new default, the package name will revert to @angular-architects/native-federation. The runtime semantics, config and builder API are identical.

Example repositories

Prerequisites