From 860b5d0efa3c0c3b0fd431957075e880542fb0dc Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 26 Jul 2019 14:21:13 +0100 Subject: [PATCH] docs: convert Ivy opt-in doc to opt-out (#31858) PR Close #31858 --- aio/content/guide/ivy.md | 47 ++++++++++++++----------------------- aio/content/navigation.json | 2 +- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/aio/content/guide/ivy.md b/aio/content/guide/ivy.md index ab47c40a3b..255f57859a 100644 --- a/aio/content/guide/ivy.md +++ b/aio/content/guide/ivy.md @@ -1,38 +1,24 @@ -# Opting into Angular Ivy +# Opting out of Angular Ivy -Ivy is the code name for Angular's [next-generation compilation and rendering pipeline](https://blog.angular.io/a-plan-for-version-8-0-and-ivy-b3318dfc19f7). Starting with Angular version 8, you can choose to opt in to start using a preview version of Ivy and help in its continuing development and tuning. +Ivy is the code name for Angular's [next-generation compilation and rendering pipeline](https://blog.angular.io/a-plan-for-version-8-0-and-ivy-b3318dfc19f7). +Starting with Angular version 9, Ivy compilation and rendering pipeline is enabled by default. +The previous compilation and rendering pipeline, View Engine, is deprecated in version 9, and will be removed at a later date. +You can choose to opt out of Ivy and continue using View Engine while making the transition. -
- - To preview Ivy, use `@angular/core@next` version of Angular (8.1.x), rather than `@angular/core@latest` (8.0.x), as it contains all the latest bug fixes and improvements. - -
- - -## Using Ivy in a new project - -To start a new project with Ivy enabled, use the `--enable-ivy` flag with the [`ng new`](cli/new) command: - -```sh -ng new shiny-ivy-app --enable-ivy -``` - -The new project is automatically configured for Ivy. Specifically, the enableIvy option is set to `true` in the project's `tsconfig.app.json` file. - - -## Using Ivy in an existing project - -To update an existing project to use Ivy, set the `enableIvy` option in the `angularCompilerOptions` in your project's `tsconfig.app.json`. +To opt out of Ivy and continue using View Engine for an existing project, set the `enableIvy` option in the `angularCompilerOptions` in your project's `tsconfig.json` to `false`. ```json { "compilerOptions": { ... }, "angularCompilerOptions": { - "enableIvy": true + "enableIvy": false } } ``` -AOT compilation with Ivy is faster and should be used by default. In the `angular.json` workspace configuration file, set the default build options for your project to always use AOT compilation. +AOT compilation with Ivy is faster than with View Engine, and can be used for development. +If you opt out of Ivy, AOT compilation will be slower, and should not be used for development in large projects. +When Ivy is disabled for a large project, make sure that the `aot` build option in that project configuration is +set to `false` and it's only set to `true` in the `production` configuration. ```json { @@ -42,7 +28,13 @@ AOT compilation with Ivy is faster and should be used by default. In the `angula "build": { "options": { ... - "aot": true, + "aot": false, + }, + "configurations": { + "production": { + ... + "aot": true + } } } } @@ -50,6 +42,3 @@ AOT compilation with Ivy is faster and should be used by default. In the `angula } } ``` - -To stop using the Ivy compiler, set `enableIvy` to `false` in `tsconfig.app.json`, or remove it completely. Also remove `"aot": true` from your default build options if you didn't have it there before. - diff --git a/aio/content/navigation.json b/aio/content/navigation.json index 0197a1295f..2bcc126d61 100644 --- a/aio/content/navigation.json +++ b/aio/content/navigation.json @@ -579,7 +579,7 @@ { "url": "guide/ivy", "title": "Angular Ivy", - "tooltip": "Opting into Angular Ivy with Angular CLI." + "tooltip": "Opting out of Angular Ivy with Angular CLI." }, { "url": "guide/web-worker",