Nodemon not using the --ignore option

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:37:23

问题


I am using Nodemon on an Expressjs project. I have the following in my package.json:

"start": "nodemon server.js --ignore 'src/**'"

I have tried several variations of the ignore glob, but every time, it still restarts when a file in 'src/' changes.

What do I need to do to get Nodemon to ignore the src directory?

Thanks.


回答1:


You can try to add a config nodemon.json with content below:

{
  "verbose": true,
  "ignore": ["src/*"]
}

"start": "nodemon server.js --config nodemon.json"

Ref: https://github.com/remy/nodemon



来源:https://stackoverflow.com/questions/47794071/nodemon-not-using-the-ignore-option

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!