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?
npm start
command, I get an error sayingwebpack-dev-server is not recognized as an internal or external command
. So is there no way to use the ejected app in both modes (dev/prod) without cli? I'm looking for a solution to do it without any manual intervention, something out of the box solution of a kind. – Oersted