-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Use fs.watch instead of chokidar if Node.js >=v19.1 #12495
Copy link
Copy link
Closed
Labels
Description
Describe the bug
File changes are not being detected when multiple instances of chokidar are running in the directory.
When using Turbowatch (which used to default to chokidar) and Vite together, Vite's HMR would just stop working.
Change watching method to polling fixes the issue, but mixes CPU go brrrrrrrr.
As far as I can tell, it is due to this issue paulmillr/chokidar#1240
For what it is worth, Turbowatch was also updated to use the suggested logic.
Theoretically Vite could just use Turbowatch to implement watching.
Reproduction
N/A
Steps to reproduce
N/A
System Info
N/AUsed Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable