DEV Community

Discussion on: Speeding up the development serve after upgrading to Angular v12

Collapse
 
alexpc_ profile image
Alejandro

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!

Collapse
 
tieppt profile image
Tiep Phan

I think he want to target serve architect, not build. Something like this.
gist.github.com/tieppt/35f7862bb85...

Then you can use ng serve with development by default and ng build with production by default.

Collapse
 
brandontroberts profile image
Brandon Roberts

Thanks Tiep.

I updated the code snippet to be more clear.