Not working on chokidar add events
Closed this issue · 5 comments
Hi! Thanks for this module. I was trying to use it to detect code changes in my routes and it works fine but it would not work when a new route file is added and added as middleware (add event on chokidar). Is there any reason why that would not work?
Please provide your example code to locate the problem.
Hi, I created a code example to show this issue. Let me know if I can be of any help to fix this.
https://github.com/federico-hv/hotrun-example
For now there is no way to hot compile the server entry module. but hotrun
provide a option to restart the app for those module that not support hot compile.
-f, --force [dir] Force restart if directory "dir" or files changed
Thanks for your response @yessky . I ended up implementing another solution since I was already using webpack. I'm sharing it just in case it works for someone https://github.com/federico-hv/koa-fullstack-hot-reload-example.
Despite this I think your solution is much better for someone who wants to get things going fast without that much configuration and in case they're not using webpack or react.
Webpack is an solution. But in node.js app development, we do not need to pack scripts. I will keep researching an solution.