Describe the bug
In a tsdown project, editing files will trigger a rebuild properly when using tsdown --watch. However, editing files imported via ?raw does not trigger a rebuild.
This is likely because the watcher is not notified via this.addWatchFile.
Reproduction
https://stackblitz.com/edit/stackblitz-starters-jrquvz9z?file=src%2Findex.ts
System Info
System:
OS: macOS 26.5
CPU: (12) arm64 Apple M3 Pro
Memory: 297.59 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.15.0
pnpm: 11.0.9
Browsers:
Chrome: 149.0.7827.156
Safari: 26.5
Used Package Manager
pnpm
Validations
Describe the bug
In a tsdown project, editing files will trigger a rebuild properly when using
tsdown --watch. However, editing files imported via?rawdoes not trigger a rebuild.This is likely because the watcher is not notified via
this.addWatchFile.Reproduction
https://stackblitz.com/edit/stackblitz-starters-jrquvz9z?file=src%2Findex.ts
System Info
System: OS: macOS 26.5 CPU: (12) arm64 Apple M3 Pro Memory: 297.59 MB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.15.0 pnpm: 11.0.9 Browsers: Chrome: 149.0.7827.156 Safari: 26.5Used Package Manager
pnpm
Validations