-
Notifications
You must be signed in to change notification settings - Fork 59
Description
On Windows (the only environment I can test with), watching files will consistently trigger 2 update events whenever any files are updated. The issue is very consistent and will always trigger 2 update events whenever a file (or multiple files) is updated, for every file 2 events will be sent
Repro
I created a small GitHub project as a full repro, you can follow the steps shown on the small project readme
https://github.com/ghiscoding/parcel-watcher-issue
Demo
Below is a demo of the issue, doing a file save triggers 2 update events consistently on Windows platform (I'm not sure if this happens on other platforms, possibly not)
Alternative
For now the only way that I found to avoid rebuilding the same file(s) multiple times is to use a Set and add a delay of 150ms before calling the callback handler. It's a bit annoying to have to wait 150ms before calling the handler when I barely had to wait when I had the same code using Chokidar v3
