← All recipes
Moderne licensed

Replace deep zone.js imports

Recipe IDorg.openrewrite.angular.migration.replace-deep-zone-js-importsArtifact@openrewrite/recipes-angular

Replaces legacy deep imports from zone.js such as zone.js/dist/zone or zone.js/bundles/zone-testing.js with the standard zone.js or zone.js/testing imports, in both TypeScript files and angular.json polyfills. Deep imports are no longer allowed in Angular 17.

Composite 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-deep-zone-js-imports

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

mod config recipes npm install @openrewrite/recipes-angular

Definition

This recipe runs the following recipes in order.

  • Replace deep zone.js TypeScript importsorg.openrewrite.angular.migration.replace-deep-zone-js-imports.typescript
  • Replace deep zone.js polyfills in angular.jsonorg.openrewrite.angular.migration.replace-deep-zone-js-imports.angular-json