← All recipes
Moderne licensed

Enable AOT compilation in angular.json

Recipe IDorg.openrewrite.angular.migration.enable-aot-buildArtifact@openrewrite/recipes-angular

Adds "aot": true to build options in angular.json. Angular 9 made AOT compilation the default, and projects upgrading from Angular 8 should enable it explicitly. Build targets using a builder that already defaults aot to true (@angular/build:application, @angular-devkit/build-angular:application, @angular-devkit/build-angular:browser-esbuild) are left untouched.

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.enable-aot-build

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

mod config recipes npm install @openrewrite/recipes-angular