Skip to content

Angular micro frontends: section guide

This section shows how to build, test and deploy an Angular 22 micro frontend system end to end, using one invented example throughout: the OrdersPortal shell (orders-portal) loading an orders-mfe remote owned by another team, deployed to hosts under example.test.

The recommended path is Native Federation (@angular-architects/native-federation) on the Angular CLI’s esbuild application builder, with standalone components and routes. webpack Module Federation (@angular-architects/module-federation with @angular-builders/custom-webpack) is covered for teams joining an existing webpack-based federation system. Neither is part of Angular itself; both are community tooling, and the introduction explains who provides what. Commands and code on the tutorial pages were run against Angular 22.2 in November 2026; versions are listed once, in Prerequisites.

Read in this order. Each page builds on the previous one and avoids repeating it.

  1. Introduction: concepts and trade-offs: what micro frontends solve, how runtime federation works, Native Federation versus webpack Module Federation, and when not to use any of it.
  2. Prerequisites: the Angular 22 toolchain (Node.js, CLI, TypeScript) and the federation package versions, with checks and install fixes.
  3. Project setup: monorepo or repository per team, creating the shell and remote, and the init schematic and the files it generates.
  4. Remote configuration: exposing standalone routes from orders-mfe, route-level providers, shared dependencies, and making the remote loadable cross-origin.
  5. Host application setup: the shell’s responsibilities, initializing federation before bootstrap, loading remote routes with fallbacks, manifests per environment, and where auth belongs.
  6. Local testing: running both apps, unit-testing the shell’s fallback, testing production builds locally, and rehearsing an outage.
  7. Azure deployment: one Azure Static Web App per deployable, CORS, caching and CSP in staticwebapp.config.json, a contract check in the remote’s pipeline, keeping open tabs working across deployments, rollback, and versioned releases on Blob Storage with Front Door.
  8. Advanced concepts: what version skew really does at runtime, lockstep Angular upgrades, contracts, authentication, Content Security Policy, state, and error attribution per remote.
  9. Webpack Module Federation: the alternative path for existing webpack/Rspack federation systems, including the Angular 22 builder change.
Question Page
Should we use micro frontends at all? Introduction
Which Node.js and package versions do I need? Prerequisites
What does ng g @angular-architects/native-federation:init change? Project setup
Why does my remote’s service fail only inside the shell? Remote configuration
How do I point production at a different remote build? Host application setup
Why do open tabs break after a remote deployment? Azure deployment
What happens if a remote is built with another Angular minor? Advanced concepts
Why does the shell show a CORS error? Local testing and Azure deployment
How do we upgrade Angular across several remotes? Advanced concepts
Our existing shell uses remoteEntry.js. What now? Webpack Module Federation
  • New Angular 22 shell and remotes: Native Federation. It stays on the CLI’s default esbuild builder and its ng add/init schematics produce the setup used in this section.
  • Adding an Angular remote to an existing webpack or Rspack Module Federation shell: webpack Module Federation, so the remote speaks the same container protocol.
  • Upgrading an older Angular Module Federation system: upgrade on the webpack path first with ng update @angular-architects/module-federation (the builder change is explained in Prerequisites), then plan a separate migration if you want Native Federation.
  • One team, one release train: neither. Use a single application with lazy-loaded routes and library boundaries.

Once your system grows past one remote, the hardest problems are communication problems. Keep these documents current, in the repositories they describe:

  • Platform guide (shell repository). How to add a remote: naming, ports, how to request a manifest entry per environment, the shared-dependency policy (which packages are singletons, which Angular minor is current), and the upgrade calendar.
  • Contract per remote (remote repository). Exposed keys and export names, providers expected from the shell, route and query parameters, events emitted or consumed, and the design-system version. Mark each item as stable or experimental.
  • Runbook per remote. Production URLs per environment, how to roll back (redeploy the previous build, or edit the manifest if you use versioned paths), dashboards and alerts, and the owning team’s on-call contact (a team alias, not a personal name).
  • Architecture decision records. Short records for decisions such as “Native Federation over webpack Module Federation”, “one Static Web App per remote” or “no shared global store”, with the context and the consequences you accepted.
  • Diagrams. One composition diagram (shell, remotes, manifest, shared packages) and one deployment diagram (hosts, CDN, APIs). Keep them as source (for example Mermaid) next to the code so they change in the same pull request.