← All recipes
Moderne licensed

Find deprecated string-based loadChildren usage

Recipe IDorg.openrewrite.angular.search.find-load-children-string-usageArtifact@openrewrite/recipes-angular

Finds usages of the deprecated string-based loadChildren syntax (e.g. loadChildren: './path/to/module#ModuleName'). String-based lazy loading was deprecated in Angular 8 and removed in Angular 11. Use dynamic imports instead: loadChildren: () => import('./path/to/module').then(m => m.ModuleName).

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.search.find-load-children-string-usage

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

mod config recipes npm install @openrewrite/recipes-angular