node-dev
node-dev copied to clipboard
node-dev exits after restarting
I'm using node-dev in conjunction with webpack -w
. Every now and then I have to restart the webpack watcher when I install new packages. Normally I can just leave node-dev running throughout this process, and as soon as I restart webpack, my server/entry point is rebuilt, node-dev sees this change, and restarts my server just like I want.
However, there seems to be something like a 33% chance that when I restart webpack, node-dev will show
[INFO] 09:20:36 Restarting
And then immediately exit. I'm not sure if maybe webpack deletes the main file for a second, and then node-dev can't find it and gives up, or what.
Only happens when I explicitly restart webpack -w
by pressing Ctrl+C and then starting it again. The continuous recompile works great with node-dev otherwise.
I know webpack is generally targeted at the browser, but you can use it server-side as well to bring some advanced features to node.
I'm too tried to use it for webpack-dev-server restart when config is changed, but it doesn't seem to work. Just shows
[INFO] {date} Restarting