I have a project that I am building and running with npm start instead of ng serve. I am an angular 2 beginner, so I don't know how to build this project for production, in order to have the dist/ folder with pure javascript/html/css in it. For ng init - created angular 2 apps, if I use ng command, I can just do ng build --prod when work is done and the dist folder is created. If I use ng build --prod on this project, angular is offering me to overwrite some of my files (app.module.ts, app.component.ts, etc....) which I don't want overwritten. There are routing things inside and I don't want to change them. How can I have the production version of this app (ie. the dist/ folder) without using the ng build --prod command? Angular-cli version is:
angular-cli: 1.0.0-beta.28.3
I think you should use @angular/cli instead of angular-cli :
npm install -g @angular/cli
when I use ng build --prod there is no such a problem.
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