Reproduction link or steps
https://github.com/rzzf/dts-repro
Describe the bug
When rolldown-plugin-dts is used with Rolldown and emitDtsOnly: true, the plugin replaces transformed source modules with an empty stub:
This makes Rolldown stop traversing transitive dependencies from that module.
As a result, a simple chain like:
can produce declarations only for index.ts and a.ts, while b.ts is omitted, even though a.ts imports b.ts.
In contrast, unplugin-dts emits all three declaration files in the same repro.
Actual output
Generated:
Missing:
In a medium-to-large project, there are roughly 1,000 .ts / .tsx / .vue source files matching the full-input pattern. If all of them are passed to Rolldown as input, rolldown-plugin-dts becomes significantly slower and the DTS build time grows substantially.
Are there any other ways to solve this issue besides adding these files to the input?
System Info
System:
OS: macOS 15.7.3
CPU: (10) arm64 Apple M4
Memory: 88.08 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.14.0 - /usr/local/bin/node
npm: 11.9.0 - /usr/local/bin/npm
pnpm: 10.28.2 - /usr/local/bin/pnpm
Browsers:
Chrome: 147.0.7727.117
Safari: 18.6
Validations
Contributions
Compensating engineering work will speed up resolution and support the project
Reproduction link or steps
https://github.com/rzzf/dts-repro
Describe the bug
When
rolldown-plugin-dtsis used with Rolldown andemitDtsOnly: true, the plugin replaces transformed source modules with an empty stub:This makes Rolldown stop traversing transitive dependencies from that module.
As a result, a simple chain like:
can produce declarations only for
index.tsanda.ts, whileb.tsis omitted, even thougha.tsimportsb.ts.In contrast,
unplugin-dtsemits all three declaration files in the same repro.Actual output
Generated:
index.d.tsa.d.tsMissing:
b.d.tsIn a medium-to-large project, there are roughly 1,000
.ts / .tsx / .vuesource files matching the full-input pattern. If all of them are passed to Rolldown as input, rolldown-plugin-dts becomes significantly slower and the DTS build time grows substantially.Are there any other ways to solve this issue besides adding these files to the
input?System Info
System: OS: macOS 15.7.3 CPU: (10) arm64 Apple M4 Memory: 88.08 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.14.0 - /usr/local/bin/node npm: 11.9.0 - /usr/local/bin/npm pnpm: 10.28.2 - /usr/local/bin/pnpm Browsers: Chrome: 147.0.7727.117 Safari: 18.6Validations
Contributions
Compensating engineering work will speed up resolution and support the project