Is there a way to disable the minification in AngularCli?
After I launch the command ng build --prod
I need to have all files.js, in dist folder, separate and legible.
Minification: In minification process following things are done within the js file to reduce the size of the js file for faster downloading. It removes all the white spaces within the file. It removes all the unwanted variables within the file. It converts all the big variable names to the smaller variable names.
Minification is the process of minimizing code and markup in your web pages and script files. It's one of the main methods used to reduce load times and bandwidth usage on websites. Minification dramatically improves site speed and accessibility, directly translating into a better user experience.
vendor. js : third-party code that your application depends on. polyfills. js : polyfills that allow using newer features in older environments (e.g., using Angular on outdated Web browsers)
Just do:
ng build --prod --optimization=false
That seems to do it. For more information see: https://github.com/angular/angular-cli/wiki/build
This is valid for angular 6.*
Note: If you use ng serve through some package.json run target, according to the manpage of Angular6 correspoding switch for this is:
ng serve --optimization=false
will speedup this bs in development noticeable
ng build --build-optimizer=false
Above command Enables '@angular-devkit/build-optimizer' optimizations when using the 'aot' option.
More details at https://angular.io/cli/build
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