From 875eedbfb07d64b0b318cca184fe98c764c0bb14 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 28 May 2019 15:32:42 +0100 Subject: [PATCH] docs: add default AOT to migrating projects to Ivy (#30697) Followup to https://github.com/angular/angular/pull/29380, https://github.com/angular/angular/pull/30238, https://github.com/angular/angular-cli/pull/14537. PR Close #30697 --- aio/content/guide/ivy.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/aio/content/guide/ivy.md b/aio/content/guide/ivy.md index 28c5a7ab7f..260952faf4 100644 --- a/aio/content/guide/ivy.md +++ b/aio/content/guide/ivy.md @@ -32,4 +32,24 @@ To update an existing project to use Ivy, set the `enableIvy` option in the `ang } ``` -To stop using the Ivy compiler, set `enableIvy` to `false` in `tsconfig.app.json`, or remove it completely. +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. + +```json +{ + "projects": { + "my-existing-project": { + "architect": { + "build": { + "options": { + ... + "aot": true, + } + } + } + } + } +} + + +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. + \ No newline at end of file