As of version 19.1.0, the Node.js fs module adds recursive watching on Linux.
Wondering if this means we can eventually stop using Chokidar…
https://github.com/nodejs/node/commit/3770d3a450fb3b65808d312cc33bdda3de92f6d4
To answer my own question, no.
It looks like the recursive watch in Node.js does 5 second polling. If you turn recursive off, you get instant notifications (although two of each for an edit on a file).
If you’re looking for an alternative to Chokidar that doesn’t use any native modules for file system watching in Node.js, take a look at Watcher:
@aral it's a good 4 years since I worked in node land. Can't believe this is still such a pain point. Disappointing
@aral thanks for posting this!! I was stuck with `chokidar` for a while!
@Frishi Chokidar is excellent, don’t get me wrong, but not having a native module is a huge advantage (at least for my use case).