Back to Nx

Migrate With Mf Import To New Package

packages/angular/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.md

23.0.0765 B
Original Source

Update withModuleFederation Import to New Package

Updates the withModuleFederation and withModuleFederationForSSR imports to use @nx/module-federation/angular. The @nx/angular/module-federation re-export path was deprecated in Nx v20.2 and is now removed.

Examples

Before
ts
import {
  withModuleFederation,
  withModuleFederationForSSR,
} from '@nx/angular/module-federation';
After
ts
import {
  withModuleFederation,
  withModuleFederationForSSR,
} from '@nx/module-federation/angular';

Notes

This migration runs for all projects in the workspace that depend on @nx/angular, ensuring imports are updated when migrating to Nx v23.