Reproduction link or steps
Observed via a Vite 8 + Storybook build (~32k modules) that emits ~44,000 warnings, almost all MODULE_LEVEL_DIRECTIVE from MUI ("use client"). The triggering condition is a build that surfaces tens of thousands of warnings through the napi callback. No isolated standalone reproduction at this time.
What is expected?
The build completes regardless of warning count. Warning emission/replay should never be able to deadlock the napi bridge.
What is actually happening?
The build hangs indefinitely — the build promise never resolves, CPU drops to ~0%, and memory plateaus (deadlock signature, not a slow build). Setting build.rolldownOptions.logLevel: "silent" makes the identical build complete in ~120s every time, which points at warning handling. An onwarn handler that mutes warnings (returns early without forwarding) does not prevent the hang, so the warnings appear to cross the Rust→JS napi boundary before the JS handler runs. Same hang / CPU-0% signature as vitejs/vite#21957 (different trigger); same class as the fixed sync-NAPI deadlock audit in #7311.
System Info
System:
OS: macOS 26.3.1
CPU: (10) arm64 Apple M1 Max
Memory: 20.73 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.13.0
npm: 11.6.2
pnpm: 11.5.1
Browsers:
Chrome: 149.0.7827.103
Firefox: 142.0
Safari: 26.3.1
npmPackages:
rolldown: 1.0.3 (transitive, via vite@8.0.16)
vite: 8.0.16
storybook: 10.3.3
@storybook/react-vite: 10.3.3
Any additional comments?
Surfaced through storybook@10.3.3 / @storybook/react-vite@10.3.3 on vite@8.0.16 (resolves rolldown@1.0.3). Workaround in place: build.rolldownOptions.logLevel: "silent".
Reproduction link or steps
Observed via a Vite 8 + Storybook build (~32k modules) that emits ~44,000 warnings, almost all
MODULE_LEVEL_DIRECTIVEfrom MUI ("use client"). The triggering condition is a build that surfaces tens of thousands of warnings through the napi callback. No isolated standalone reproduction at this time.What is expected?
The build completes regardless of warning count. Warning emission/replay should never be able to deadlock the napi bridge.
What is actually happening?
The build hangs indefinitely — the build promise never resolves, CPU drops to ~0%, and memory plateaus (deadlock signature, not a slow build). Setting
build.rolldownOptions.logLevel: "silent"makes the identical build complete in ~120s every time, which points at warning handling. Anonwarnhandler that mutes warnings (returns early without forwarding) does not prevent the hang, so the warnings appear to cross the Rust→JS napi boundary before the JS handler runs. Same hang / CPU-0% signature as vitejs/vite#21957 (different trigger); same class as the fixed sync-NAPI deadlock audit in #7311.System Info
Any additional comments?
Surfaced through
storybook@10.3.3/@storybook/react-vite@10.3.3onvite@8.0.16(resolvesrolldown@1.0.3). Workaround in place:build.rolldownOptions.logLevel: "silent".