node.jsangular-cling-build

Manually restarting `ng build --watch` or `ng serve`


When we use nodemon, for example, we can manually trigger a rebuild by typing rs to stdin and hitting return/enter.

I am wondering if there is a way to manually trigger a rebuild when using ng build --watch or ng serve. On occasion, these fail to pick up files, or fail during a bigger refactor. Instead of using ctrl-c, I am wondering if there is a way to type something into stdin.


Solution

  • You just need to club them

    nodemon ng build --watch
    

    And it works in both cases, changes as well as rs manual restart

    Nodemon