Back to all fixes
CuratedTypeScriptVite 8local
vite build --watch hangs on rebuild after editing a file (rolldown-vite >= 7.1.13)
Problem
Running `vite build --watch`, the first build completes fine, but editing any source file triggers a rebuild that prints "build started..." and then hangs forever (no error, no completion). Regressed starting at rolldown-vite 7.1.13; more likely on large projects (600+ files) and correlates with lower CPU thread counts.
Solution
typescript
Root cause: rolldown's default blocking-thread pool size was too small for large dependency graphs, causing a deadlock during rebuild. Workaround (works on 7.1.13/7.1.14): set the env var `ROLLDOWN_MAX_BLOCKING_THREADS=32` (or 8/16 depending on your CPU) before running the watch build, e.g. `ROLLDOWN_MAX_BLOCKING_THREADS=32 vite build --watch`. Fixed properly by changing the default value upstream, shipped in rolldown-vite v7.1.17 — upgrade and the env var override is no longer needed. Filed upstream at rolldown/rolldown#6393.