Skip to main content
The @nx/angular plugin integrates Angular into your Nx workspace. It extends the Angular CLI with Nx’s monorepo capabilities, including incremental builds, affected commands, and distributed task execution. It is compatible with Angular schematics and supports NgRx, Module Federation, SSR, and Storybook.

Installation

Or install manually:
@nx/angular requires Angular peer dependencies including @angular-devkit/build-angular, @angular-devkit/core, @angular-devkit/schematics, @schematics/angular, and rxjs. These are installed alongside Angular itself.

What the plugin provides

Generators

Scaffold applications, libraries, components, directives, pipes, NgRx stores, Module Federation setups, and more.

Executors

Build, serve, and test Angular applications with esbuild, webpack, and ng-packagr.

Schematics compatibility

Fully compatible with Angular CLI schematics. Run any @schematics/angular generator inside an Nx workspace.

Generators

application

Create a new Angular application.

library

Create an Angular library within the workspace. Libraries can be internal (imported by other projects) or publishable (distributed as npm packages).

component

Generate an Angular component inside an existing project.

directive

Generate an Angular directive.

pipe

Generate an Angular pipe.

ngrx-feature-store

Add an NgRx feature store to an application or library.

ngrx-root-store

Add an NgRx root store to an application.

host

Generate a Module Federation host Angular application.

remote

Generate a Module Federation remote Angular application.

setup-ssr

Add Angular Universal (SSR) to an existing application.

storybook-configuration

Add Storybook configuration to an Angular project.

web-worker

Create a Web Worker within an Angular application.

library-secondary-entry-point

Create a secondary entry point for a publishable Angular library, following the Angular Package Format.

scam

Generate a component with an accompanying Single Component Angular Module (SCAM).

convert-to-rspack

Convert an existing Angular webpack project to use Rspack for faster builds.

Executors

application

Build an Angular application using esbuild with integrated SSR and prerendering support.

package

Build and package an Angular library following the Angular Package Format (APF). Drop-in replacement for @angular-devkit/build-angular:ng-packagr with added support for incremental builds.

ng-packagr-lite

Build an Angular library with incremental build support, producing ESM2022 bundles. Intended for buildable libraries in incremental build scenarios.

module-federation-dev-server

Serve a Module Federation host application (webpack-based) and specify which remotes to start.

unit-test

Run application unit tests. Requires Angular 21.0.0 or later.

extract-i18n

Extract i18n messages from Angular source code.

Configuration examples

Publishable library ng-package.json

Application project.json (esbuild)

Angular CLI compatibility

@nx/angular is fully compatible with Angular CLI schematics. Any schematic from @schematics/angular works within an Nx workspace:
Use nx generate instead of ng generate to benefit from Nx’s dry-run support, project graph updates, and task caching.