I use Visual Studio Code (VSCode). I run several front end enterprise sized projects locally to fix bugs and refactor bits (angular & sometimes react). Biggest one I currently run is an Angular monorepo using NX but I’m not sure that’s relevant. I also save often (used to have power cuts a lot). Projects constantly have to rebuild after starting a localhost live server for dev build UI. I’m wondering if there is a way to pause the live reload process from listening then later un-pause when I’m ready without killing the whole node process and starting the build from scratch.
Actual results
- I run
ng serve
ornpm run start
or whatever the flavour of the day is to get local going. - I make code change.
- I save. It rebuilds (sometimes a while for very large projects).
- I make a bunch more code changes over several files and it (the node process running with live changes) restarts the rebuilds after each save.
This results in a very slow experience sometimes, because the IDE is so busy building/rebuilding/throwing errors, that it’s actually easier to just Ctrl + C
stop the localhost serve process and start from scratch shortly after. But then it’s a completely fresh build, instead of just rebuilding what changed.
Desired results
- Start local.
- Run some sort of “pause” command/keyboard shortcut. (no rebuild triggered after each file save once paused)
- Make code changes.
- Run some sort of “unpause” command/keyboard shortcut and wait for local to rebuild touched files.
TL/DR: Is there a way to pause localhost “live listen” process?