@nrwl/angular:setup-mf
Create Module Federation configuration files for given Angular Application.
Create Module Federation configuration files for given Angular Application.
The setup-mf
generator is used to add Module Federation support to existing applications.
To convert an existing application to a host application, run the following
nx g setup-mf myapp --mfType=host --routing=true
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
The name of the application to generate the Module Federation configuration for.
remote
host
, remote
Type of application to generate the Module Federation configuration for.
Generate a routing setup to allow a host application to route to the remote application.
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
.
static
static
, dynamic
Use either Static or Dynamic Module Federation pattern for the application.
The name of the host application that the remote application will be consumed by.
The port at which the remote application should be served.
The prefix to use for any generated component.
A list of remote application names that the host application should consume.
false
Do not set up E2E related config.
false
Whether the application is a standalone application. Note: This is only supported in Angular versions >= 14.1.0
Skip formatting the workspace after the generator completes.
false
Do not add dependencies to package.json
.