browserify-middleware icon indicating copy to clipboard operation
browserify-middleware copied to clipboard

Make watchify ignore node_modules by default

Open joguSD opened this issue 9 years ago • 3 comments

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.

joguSD avatar Oct 21 '16 09:10 joguSD

Coverage Status

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

coveralls avatar Oct 21 '16 10:10 coveralls

Coverage Status

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

coveralls avatar Oct 21 '16 10:10 coveralls

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).

ForbesLindesay avatar Oct 21 '16 13:10 ForbesLindesay