parent
ee7c5ed620
commit
8a13f6b278
|
@ -14,7 +14,6 @@ ng new shiny-ivy-app --enable-ivy
|
|||
The new project is automatically configured for Ivy.
|
||||
- The `enableIvy` option is set to `true` in `tsconfig.app.json`.
|
||||
- The `"aot": true` option is added to your default build options.
|
||||
- A `postinstall` script is provided for the [Angular Compatibility Compiler](#ngcc).
|
||||
|
||||
{@a updating}
|
||||
## Updating an existing project to use Ivy
|
||||
|
@ -66,20 +65,6 @@ const routes: Routes = [{
|
|||
}
|
||||
}
|
||||
```
|
||||
- Add a `postinstall` script to the workspace `package.json` file to run the [Angular Compatibility Compiler](#ngcc).
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
...
|
||||
"postinstall": "ivy-ngcc"
|
||||
}
|
||||
}
|
||||
```
|
||||
- Reinstall your `package.json` dependencies to run the newly added script.
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
## Switching back to the current compiler
|
||||
|
||||
|
@ -87,22 +72,3 @@ To stop using the Ivy compiler you need to undo the steps taken when [updating t
|
|||
- Set `enableIvy` to false in `tsconfig.app.json`, or remove it completely.
|
||||
- Add `"experimentalImportFactories": true` to your default build options in `angular.json` to support the import statement in `loadChildren` outside Ivy.
|
||||
- Remove `"aot": true` from your default build options if you didn't have it there before.
|
||||
- Remove the `postinstall` script.
|
||||
- Delete and reinstall your node modules.
|
||||
|
||||
|
||||
{@a ngcc}
|
||||
## The Angular Compatibility Compiler
|
||||
|
||||
The Angular Compatibility (`ngcc`) compiler helps you compile third-party libraries with Ivy so that you can use them in your Ivy application.
|
||||
Use a postinstall script in your `package.json` to always run `ngcc` when you install your `package.json` dependencies, so that all projects in the workspace are compiled with Ivy.
|
||||
|
||||
<div class="alert is-helpful">
|
||||
|
||||
Using a postinstall hook to run `ngcc` is just a temporary integration.
|
||||
We expect `ngcc` to be seamlessly integrated into the Angular CLI build pipeline in the future before the full Ivy rollout.
|
||||
Once that's implemented `ngcc` will not be visible to developers.
|
||||
|
||||
Note that there are currently some build-time performance issues with `ngcc`. Please bear with us while we improve the tooling and build integration in the Angular CLI.
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue