← All recipes
Moderne licensed

Replace string-based loadChildren with dynamic import()

Recipe IDorg.openrewrite.angular.migration.replace-load-children-stringArtifact@openrewrite/recipes-angular

Converts the deprecated string-based loadChildren: 'path#Module' syntax to dynamic imports: loadChildren: () => import('path').then(m => m.Module).

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.migration.replace-load-children-string

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular