← All recipes
Moderne licensed

Make standalone flag explicit

Recipe IDorg.openrewrite.angular.migration.explicit-standalone-flagArtifact@openrewrite/recipes-angular

Adds standalone: false to Angular components, directives, and pipes that are declared in an @NgModule, and removes redundant standalone: true from the rest, since standalone became the default in Angular 19. Classes that are not declared in any @NgModule are left alone, because they are already standalone under the new default.

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.explicit-standalone-flag

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

mod config recipes npm install @openrewrite/recipes-angular