1

I have an Angular application where a lot of rebuilds are necessary, to avoid long build times I use a deamon like process where I execute the ng build --prod --watch command. This works fine BUT I cannot find a lot of documentation about the ng build or ng build --watch command and before I use this in production I want to understand what happens behind the scenes.

Could you provide me with information or some usefull links about the angular cli especially the build command and the --watch flag.

Is it there a mechanism or an API like tool where I can use the ng build --watch like behaviour to build my "own" tool with some additional features client side notification, replace or add new/changed files etc.

R. Richards
  • 24,603
  • 10
  • 64
  • 64
Cowas
  • 328
  • 2
  • 12
  • Does this answer your question? [How Angular builds and runs](https://stackoverflow.com/questions/48942691/how-angular-builds-and-runs) – Raghul SK Jun 25 '20 at 11:00
  • Thanks for the reply, of course I read this post before creating my own. It explains in depth the general concept but no further information on the --watch flag. – Cowas Jun 25 '20 at 11:13
  • Is it possible to use the --watch flag for production or is it only a dev tool like ng serve, how does the angular cli handle the "partial" rebuild and is there any chance to hook into the build --watch process? – Cowas Jun 25 '20 at 11:15
  • I see no reason to build in production, ever. – JWP Jun 25 '20 at 11:24

0 Answers0