只有改变main.js才会触发nodemon监听
来源:2-2 创建 browserWindow

测不准
2019-08-21
windows配置**“start”: “nodemon --watch main.js --exec electron .”**,改变main.js文件可以监听到,但是改变index.html或者renderer.js无法触发,我看老师的视频是都能触发的,不知道是不是电脑不同处理的差异,请问下老师有没有可以监听所有文件的的方法,要不改变别的文件时候触发太费事了,谢谢
写回答
1回答
-
张轩
2019-08-21
同学你好 我们仅仅watch 了一个文件 但是修改这种 渲染进程的文件 比如index.html 不需要重启 只要刷新页面就好了 Control +R
如果你想 watch 多个文件或者是文件夹,也是没问题的,文档在这里https://github.com/remy/nodemon#monitoring-multiple-directories
00
相似问题