Bundle TypeScript .d.ts declaration files with Rollup
open sourceLGPL-3.0-onlyfree
rollup-plugin-dts is a Rollup plugin that rolls up a library's TypeScript .d.ts declaration files into a single bundled declaration file, so a package can ship one types file. It marks external libraries (such as @types packages) as external automatically, and can load declaration maps for detailed source maps that keep Go to Definition working.
Problems it solves
- ship a single bundled .d.ts file with my TypeScript library
- roll up TypeScript declaration files with Rollup
- publish one types entry for an npm package
Features
- bundles .d.ts files into one declaration file
- externals such as @types left out automatically
- declaration maps for Go to Definition
Alternatives
The same job
These do what rollup-plugin-dts does.
- tsdown Library bundler for TypeScript and JavaScript, built on Rolldown
- unplugin-dts Generate .d.ts declaration files from TypeScript or Vue sources in your bundler
- tsup Zero-config bundler for TypeScript libraries, powered by esbuild
- TSDX Zero-config CLI for developing, testing and publishing TypeScript packages
- Rolldown Fast Rust bundler for JavaScript and TypeScript with a Rollup-compatible API
- Rollup ES module bundler for JavaScript libraries and apps, with tree shaking
