@nx/angular:convert-to-with-mf

Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met:

  • Is either a host or remote application
  • Shared npm package configurations have not been modified
  • Name used to identify the Micro Frontend application matches the project name

OverridesThis generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!.

Usage

1nx generate convert-to-with-mf ... 2

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

You can specify the collection explicitly as follows:

1nx g @nx/angular:convert-to-with-mf ... 2
Nx 15 and lower use @nrwl/ instead of @nx/

Show what will be generated without writing to disk:

1nx g convert-to-with-mf ... --dry-run 2

Examples

Convert a Module Federation Project using legacy webpack config to use the withModuleFederation helper.:

1nx g @nx/angular:convert-to-with-mf --project mf-app 2
Nx 15 and lower use @nrwl/ instead of @nx/

Options

project

string

The name of the micro frontend project to migrate.