Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI does not set aot:true in angular.json for the dev server #16335

Closed
juristr opened this issue Dec 2, 2019 · 2 comments
Closed

CLI does not set aot:true in angular.json for the dev server #16335

juristr opened this issue Dec 2, 2019 · 2 comments

Comments

@juristr
Copy link
Contributor

@juristr juristr commented Dec 2, 2019

馃悶 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No, it's not a regression since this is something new that is supposed to change with Ivy.

Description

After the ng update command I expect that my projects in the angular.json have the aot flag set to true, not just for the production configuration, but also for the dev server.

馃敩 Minimal Reproduction

Using node v12.4.0 and using yarn as my package manager (it's configured globally s.t. also the ng update command picks it up properly).

Commands run:

$ git clone git@github.com:juristr/superforms-talk.git
$ cd superforms-talk
$ ng update @angular/core@next @angular/cli@next --force

The only change to the angular.json is the addition of the budgets section

image

馃實 Your Environment




Angular CLI: 9.0.0-rc.4
Node: 12.4.0
OS: darwin x64

Angular: 9.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.4
@angular-devkit/build-angular     0.900.0-rc.4
@angular-devkit/build-optimizer   0.900.0-rc.4
@angular-devkit/build-webpack     0.900.0-rc.4
@angular-devkit/core              9.0.0-rc.4
@angular-devkit/schematics        9.0.0-rc.4
@angular/cdk                      8.2.3
@angular/material                 8.2.3
@ngtools/webpack                  9.0.0-rc.4
@schematics/angular               9.0.0-rc.4
@schematics/update                0.900.0-rc.4
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2
@alan-agius4

This comment has been minimized.

Copy link
Collaborator

@alan-agius4 alan-agius4 commented Dec 2, 2019

When updating to a release version it is recommended to use the --next flag.

ng update @angular/core @angular/cli --next

This is because there are a couple of differences between @next and --next.

The main being that that @next will only use the next npm tag of the package provided. While --next will use also update to the latest prerelease version of the CLI to perform the update and peerDependencies matching will include pre-release versions, which otherwise you'd need to use the --force to suppress the warnings and continue with the update.

Note: The aot option should not be added under dev-server but rather under build -> options, because the builder builder options will be used unless overridden in the dev-server options.

@juristr

This comment has been minimized.

Copy link
Contributor Author

@juristr juristr commented Dec 2, 2019

Awesome, make sense. Thx for debugging 馃憤

@juristr juristr closed this Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.