@nx/angular:setup-mf
Create Module Federation configuration files for given Angular Application.
Monorepo World: October 7, 2024Monorepo World: October 7, 2024Join us!
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
1nx g setup-mf myapp --mfType=host --routing=true
2
1nx generate setup-mf ...
2
By default, Nx will search for setup-mf
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/angular:setup-mf ...
2
Show what will be generated without writing to disk:
1nx g setup-mf ... --dry-run
2
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.
true
Whether the application is a standalone application.
false
Whether or not to configure the ESLint parserOptions.project
option. We do not do this by default for lint performance reasons.
true
Whether the module federation configuration and webpack configuration files should use TS.
Skip formatting the workspace after the generator completes.
false
Do not add dependencies to package.json
.