Can someone explain me exactly the difference between those two flags (optimization
and buildOptimizer
) defined in the build config angular.json
during the build process when I execute ng build
?
The official build documentation isn't clear to me.
buildOptimizer optimizes the transpilation of TS to JS (remove unused code, add tslib,..) More detailed explanation in the readme of the package https://www.npmjs.com/package/@angular-devkit/build-optimizer
optimization flag I think this one indicates the execution of some Webpack plugins. As in what to do with the JS after the buildOptimizer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With