finds.dev← search

// the find

sxzz/rolldown-plugin-dts

★ 240 · TypeScript · MIT · updated Jul 2026

A Rolldown plugin to generate and bundle dts files.

A Rolldown plugin that generates and bundles TypeScript declaration files, supporting three backends: the standard tsc compiler, Oxc's isolated declarations transformer, and the experimental TypeScript Go compiler. It's the spiritual successor to rollup-plugin-dts, built for the Rolldown/Vite ecosystem. Aimed at library authors who want .d.ts output as part of their Rolldown build rather than a separate tsc invocation.

The three-generator architecture is genuinely useful — you can opt into Oxc for fast isolated-declarations builds and fall back to tsc when you need full type inference. The automatic generator selection based on what's installed is a nice touch that reduces config friction. Test coverage is extensive, including the full rollup-plugin-dts fixture suite with documented known-diff patches, which gives you a clear picture of where behavior diverges. The code-splitting story with named .d chunks is something the original rollup-plugin-dts never handled well.

CJS output requires two separate build passes — this isn't a limitation they invented, but it means the 'single build' pitch only holds for ESM, and the workaround (emitDtsOnly + a second config) adds real complexity to any package that ships both formats. The tsgo generator is experimental and explicitly not production-ready, but the README buries that warning; someone skimming the options table will enable it and be surprised when it ignores tsconfigRaw and compilerOptions entirely. The Vite integration note about oxc.exclude is easy to miss and silently produces broken output if you forget it — this deserves to be an automatic guard in the plugin, not a docs footnote. Custom language support (Vue, Astro) is marked experimental with an API-change warning, which is fine, but there's no guidance on what 'experimental' means for stability or timeline.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →