ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

Make watchify ignore node_modules by default #100

Open joguSD opened 7 years ago

joguSD commented 7 years ago

For any project with more than a few dependencies polling on the node_modules directory requires a lot of cpu (nearly 100% in my vm). Adding ignoreWatch: true to watchify's options to enable the following ignore pattern: ignoreWatch: ['**/node_modules/**'] seems like a more sane default. This drastically reduces CPU usage when polling is enabled.

Related to #96, but doesn't directly fix it.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 90.95% when pulling 734d2138e69223477a4e82866f1ad990eae87d8c on joguSD:master into 83a71d24e3cc3f03f7cbf8b9ecab0110d9a22f52 on ForbesLindesay:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 90.95% when pulling 734d2138e69223477a4e82866f1ad990eae87d8c on joguSD:master into 83a71d24e3cc3f03f7cbf8b9ecab0110d9a22f52 on ForbesLindesay:master.

ForbesLindesay commented 7 years ago

I still want us to detect changes to node_modules by default, maybe we could be a bit more clever about it though (maybe only poll every 5 seconds or something).