There is something I don’t get. Why is good that ng build defaults to production and then we manually changed it to “dev” - isn’t it like undoing what Angular has done in that matter? Wouldn’t be better if Angular/We instead would only change the npm scripts to have start with dev mode + build defaults to prod?
Asking you as you are a reference in Angular world and would love to hear your thoughts on this, if you would like to. (And also because you have wrote about this) :)
I'm passionate about Web Software Engineer: PHP, Nodejs, Javascript, Angular, Java.
I'm also a blogger (http://www.tiepphan.com/), I wrote a lot articles in Web development, specialized in Angular.
Hi Brandon, thanks for this post.
There is something I don’t get. Why is good that ng build defaults to production and then we manually changed it to “dev” - isn’t it like undoing what Angular has done in that matter? Wouldn’t be better if Angular/We instead would only change the npm scripts to have start with dev mode + build defaults to prod?
Asking you as you are a reference in Angular world and would love to hear your thoughts on this, if you would like to. (And also because you have wrote about this) :)
Thanks again for the post!
I think he want to target
serve
architect, notbuild
. Something like this.gist.github.com/tieppt/35f7862bb85...
Then you can use
ng serve
with development by default andng build
with production by default.Thanks Tiep.
I updated the code snippet to be more clear.