Commit activity
Last 12 weeks · 308 commits
Community health
5 of 6 standards met
Recent PRs & issues
Problem On macOS, the same APFS directory can be reached through two paths. Chokidar 3 can register a watch using one path while FSEvents reports changes using the other. The prefix check drops those events, so Vite's HMR WebSocket stays connected but saving a file leaves the served module stale. Fix Extend Vite's existing Chokidar 3 patch to handle this path mismatch. When an event falls outside the watched prefix, the watcher looks for a same-named ancestor and compares its device and inode with the watched path. Once verified, the alias is cached and subsequent events are mapped back to the original watch path. Verification Reproduced with Vite 8.3.8 and the default watcher settings on macOS 27.0.1 (arm64), using both an external System volume path and the startup Data volume mount path. Before: Saving a file produced no HMR update, and HTTP continued to serve the old module. After: Both in-place writes and atomic saves produced HMR updates, and HTTP served the updated module. Saving produced a Vue HMR update without a full page reload. The build passed. Unit tests reported 1,279 passed and 6 skipped.
On macOS, Vite can miss file changes when it watches a project through an APFS System volume firmlink and FSEvents reports changes under the equivalent Data volume path. This PR documents two workarounds: pass the Data volume path explicitly as the Vite root, or enable . A minimal JavaScript project reproduced the issue on Vite 6.4.3 and 8.3.8. Using the Data volume path restored HMR on both versions. Polling also restored HMR on 8.3.8. The patch changes documentation only, so validation focused on reproducing the issue and checking the documented workarounds.
Repository: vitejs/vite. Description: Next generation frontend tooling. It's fast! Stars: 83911, Forks: 10222. Primary language: TypeScript. Languages: TypeScript (84.2%), JavaScript (8.7%), HTML (4.2%), CSS (2.3%), Vue (0.2%). License: MIT. Homepage: http://vite.dev Topics: build-tool, dev-server, frontend, hmr, vite. Latest release: v8.3.8 (4d ago). Open PRs: 100, open issues: 702. Last activity: 16h ago. Community health: 87%. Top contributors: sapphi-red, yyx990803, patak-cat, bluwy, renovate[bot], btea, antfu, hi-ogawa, underfin, shulaoda and others.