New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ivy guide update #29506
Ivy guide update #29506
Conversation
You can preview 8ced065 at https://pr29506-8ced065.ngbuilds.io/. |
aio/content/guide/ivy.md
Outdated
|
||
{@a updating} | ||
## Updating an existing project to use Ivy | ||
|
||
By configuring a few key files, you can also update your existing project(s) to use Ivy. | ||
|
||
- Add the `allowEmptyCodegenFiles` (needed only before version 8 final) and `enableIvy` options in the `angularCompilerOptions` in your project's `src/tsconfig.app.json`: | ||
- Add the `enableIvy` option inside `angularCompilerOptions` in your project's `src/tsconfig.app.json`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for version 8, this tsconfig is not under src
anymore. it's in the root.
tsconfig.app.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
aio/content/guide/ivy.md
Outdated
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Switching back to the current compiler | ||
|
||
To stop using the Ivy compiler you need to undo the steps taken when [updating to use Ivy](#updating). | ||
- Set `enableIvy` to false in `src/tsconfig.app.json`, or remove it completely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/tsconfig.app.json -> tsconfig.app.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
aio/content/guide/ivy.md
Outdated
|
||
## Switching back to the current compiler | ||
|
||
To stop using the Ivy compiler you need to undo the steps taken when [updating to use Ivy](#updating). | ||
- Set `enableIvy` to false in `src/tsconfig.app.json`, or remove it completely. | ||
- Add `"experimentalImportFactories": true` to your default build options to support the import statement in `loadChildren` outside Ivy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
say where are the default build options? (which file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
``` | ||
npm install | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you still need to restore node_modules/
to clean up typings modified by ngcc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK it's ok to leave it there for VE compilations because the typings were additive. So if you want to switch back and forth there is no need to reinstall. Also if you want to switch, and you reinstall, the first build will again take longer.
Is there any real risk that new typings will be used by accident?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, even if additive, the typings will be wrong. (For example, certain classes will claim thay have some properties that they don't.)
I don't know of any reason for people to want to use or care about those properties, so they are probably harmless, but I might miss something.
8ced065
to
ac5bc0f
Compare
You can preview ac5bc0f at https://pr29506-ac5bc0f.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the new behavior?
Ivy guide is updated with up to date steps.
Does this PR introduce a breaking change?
Other information
Blocked on angular/angular-cli#13948 and angular/angular-cli#13968