@nrwl/angular:setup-mf

Create Module Federation configuration files for given Angular Application.

Usage

nx generate setup-mf ...

By default, Nx will search for setup-mf in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/angular:setup-mf ...

Show what will be generated without writing to disk:

nx g setup-mf ... --dry-run

Options

appName

Required
string

The name of the application to generate the Module Federation configuration for.

e2eProjectName

string

The project name of the associated E2E project for the application. This is only required for Cypress E2E projects that do not follow the naming convention <appName>-e2e.

federationType

string
Default: static
Accepted values: static, dynamic

Use either Static or Dynamic Module Federation pattern for the application.

host

string

The name of the host application that the remote application will be consumed by.

mfType

Required
string
Default: remote
Accepted values: host, remote

Type of application to generate the Module Federation configuration for.

port

number

The port at which the remote application should be served.

prefix

string

The prefix to use for any generated component.

remotes

Array<anything>

A list of remote application names that the host application should consume.

routing

boolean

Generate a routing setup to allow a host application to route to the remote application.

skipFormat

boolean

Skip formatting the workspace after the generator completes.

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.