@nx/angular:remote

Create an Angular Remote Module Federation Application.

Usage

1nx generate remote ... 2

By default, Nx will search for remote in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/angular:remote ... 2

Show what will be generated without writing to disk:

1nx g remote ... --dry-run 2

Examples

Create an Angular app with configuration in place for Module Federation. If host is provided, attach this remote app to host app's configuration.:

1nx g @nx/angular:remote appName --host=host --port=4201 2

Options

directory

Required
string

The directory of the new application.

host

string

The name of the host app to attach this remote app to.

name

string
Pattern: ^[a-zA-Z_$][a-zA-Z_$0-9]*$

The name to give to the remote Angular app.

addTailwind

boolean
Default: false

Whether to configure Tailwind CSS for the application.

backendProject

string

Backend project that provides data to this application. This sets up proxy.config.json.

e2eTestRunner

string
Default: playwright
Accepted values: playwright, cypress, none

Test runner to use for end to end (E2E) tests.

inlineStyle

s
boolean
Default: false

Specifies if the style will be in the ts file.

inlineTemplate

t
boolean
Default: false

Specifies if the template will be in the ts file.

linter

string
Default: eslint
Accepted values: eslint, none

The tool to use for running lint checks.

port

number

The port on which this app should be served.

prefix

p
string
Format: html-selector

The prefix to apply to generated selectors.

style

string
Default: css
Accepted values: css, scss, sass, less

The file extension to be used for style files.

skipTests

S
boolean
Default: false

Skip creating spec files.

strict

boolean
Default: true

Create an application with stricter type checking and build optimization options.

setParserOptionsProject

boolean
Default: false

Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.

standalone

boolean
Default: true

Whether to generate a remote application with standalone components.

ssr

boolean
Default: false

Whether to configure SSR for the remote application to be consumed by a host application using SSR.

serverRouting

boolean
Default: false

Creates a server application using the Server Routing and App Engine APIs (Developer Preview). Note: this is only supported in Angular versions >= 19.0.0.

tags

string

Add tags to the application (used for linting).

typescriptConfiguration

boolean
Default: true

Whether the module federation configuration and webpack configuration files should use TS.

unitTestRunner

string
Default: jest
Accepted values: jest, vitest, none

Test runner to use for unit tests.

viewEncapsulation

string
Accepted values: Emulated, None, ShadowDom

Specifies the view encapsulation strategy.

skipPackageJson

Internal
boolean
Default: false

Do not add dependencies to package.json.

skipFormat

Internal
boolean
Default: false

Skip formatting files.

standaloneConfig

Deprecated
boolean
Default: true

Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json.

Nx only supports standaloneConfig