Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Production compilation with ejected Angular 4 application produces large files

Tags:

ng build --prod Angular CLI command produces highly compressed javascript files in Angular4 application.

When the application is ejected using ng eject command, Angular CLI commands are gone and we are left with npm scripts( npm run build command to build the app), but unfortunately that command outputs a non-production build.

I tried running webpack -p command directly but the output result files are slightly larger compared to the output of ng build --prod command.

How to get a compression equivalent of ng build --prod command but on an ejected application? What command/arguments can produce such results?