webtides / luna-js

MIT License
8 stars 0 forks source link

Use native --watch for node #118

Open eddyloewen opened 1 year ago

eddyloewen commented 1 year ago

Node has added a native watch mode in v18.11.0 (https://nodejs.org/en/blog/release/v18.11.0/) Would it be possible to implement this and would it maybe fix the problem of spinning up multiple node sessions in the debugger?

eddyloewen commented 6 months ago

It actually doesn't help or change the underlying issue. The native --watch mode also just simply creates a new child process. I just tried it...

But I think that we actually don't need to completely nuke the process and start everything from scratch. Wouldn't it be enough to remove the old definitions (pages/layouts/compnents), register the new ones and load or override the (express) route handler functions?