1

I'm working in a project that's require the AOT compilation but for some particular feature into the project I need to turn to false the option buildOptimizer into angular.json

My question is: The AOT compilation persist if I turn to false the property buildOptimizer?

"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false
yurzui
  • 205,937
  • 32
  • 433
  • 399
Abel Valdez
  • 2,368
  • 1
  • 16
  • 33
  • 2
    The short answer is yes – yurzui Mar 08 '19 at 19:49
  • And the long answer? – Abel Valdez Mar 08 '19 at 19:54
  • And the long answer is the `buildOptimizer` option has nothing to do with AOT compilation which is set to `true` in your config – yurzui Mar 08 '19 at 19:55
  • I'm asking because in the documentation has the following information: `--buildOptimizer=true|false Enables '@angular-devkit/build-optimizer' optimizations when using the 'aot' option.` – Abel Valdez Mar 08 '19 at 19:57
  • 2
    Ah.. I see. That's because buildOptimizer cannot be used without aot. https://github.com/angular/angular-cli/blob/15b208fa958643599b3cd020048eb49c27ba5e3a/packages/angular_devkit/build_angular/src/browser/index.ts#L116-L119. But we can use aot without buildOptimizer – yurzui Mar 08 '19 at 20:04
  • Do you want to post as answer? – Abel Valdez Mar 08 '19 at 20:14
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/189702/discussion-between-abel-valdez-and-yurzui). – Abel Valdez Mar 08 '19 at 20:15

0 Answers0