Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle MustScanSubDirs for large projects
When you scan a really large folder for file event changes, the client or kernel might not be able to keep up with all the initial 'add' events sent by fsevents. This happens for me with our humongous vite project that has thousands of files that are sent to firefox. At some point today, chokidar receives undefined as file type when it's actually a rescan request, and fsevents / chokidar attempts to unlink the directory instead of rescanning it, making vite crash after a while instead of finishing processing fsevents. This might be a fix in the correct direction, but the maintainers here are probably better at evaluating it. With this patch locally, vite no longer stops working for large projects on initial load.
- Loading branch information