Skip to content

Older CLI versions didn't use target:es2015 so we need to update them #14321

Closed
@StephenFluin

Description

@StephenFluin

🐞 Bug report

Command (mark with an x)

- [x] update

Is this a regression?

No

Description

If you used an older version of the CLI, you won't get the new differential loading benefits automatically because the CLI used to create new projects with target: es5 in the tsconfig.json.

Example: https://github.com/StephenFluin/angular-update-guide/blob/master/src/tsconfig.app.json

🔬 Minimal Reproduction

Take an old Angular app, run ng update @angular/cli@next @angular/core@next.

Run ng build --prod

🔥 Exception or Error

The built files will not support differential loading.

We should automatically check / fix this setting in an ng update schematic.

🌍 Your Environment


Angular CLI: 8.0.0-rc.2
Node: 12.1.0
OS: linux x64
Angular: 8.0.0-rc.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-rc.2
@angular-devkit/build-angular     0.800.0-rc.2
@angular-devkit/build-optimizer   0.800.0-rc.2
@angular-devkit/build-webpack     0.800.0-rc.2
@angular-devkit/core              8.0.0-rc.2
@angular-devkit/schematics        8.0.0-rc.2
@angular/cdk                      8.0.0-rc.0
@angular/material                 8.0.0-rc.0
@ngtools/webpack                  8.0.0-rc.2
@schematics/angular               8.0.0-rc.2
@schematics/update                0.800.0-rc.2
rxjs                              6.5.1
typescript                        3.4.5
webpack                           4.30.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions