Gathering detailed insights and metrics for rollup-plugin-dts
Gathering detailed insights and metrics for rollup-plugin-dts
Gathering detailed insights and metrics for rollup-plugin-dts
Gathering detailed insights and metrics for rollup-plugin-dts
@lang/rollup-plugin-dts
An experiment to generate .d.ts rollup files
rollup-plugin-flat-dts
.d.ts files flattener and Rollup plugin
@jiek/rollup-plugin-dts
A rollup plugin that will bundle up your .d.ts definition files.
@hyrious/dts
Invoke rollup-plugin-dts to generate bundled .d.ts file
A rollup plugin to generate .d.ts rollup files for your typescript project
npm install rollup-plugin-dts
Typescript
Module System
Min. Node Version
Node Version
NPM Version
92.4
Supply Chain
98.5
Quality
78
Maintenance
100
Vulnerability
80.2
License
TypeScript (95.27%)
JavaScript (4.73%)
Total Downloads
55,624,763
Last Day
46,178
Last Week
758,450
Last Month
3,373,020
Last Year
28,172,905
LGPL-3.0 License
842 Stars
631 Commits
75 Forks
6 Watchers
4 Branches
48 Contributors
Updated on Jul 02, 2025
Minified
Minified + Gzipped
Latest Version
6.2.1
Package Id
rollup-plugin-dts@6.2.1
Unpacked Size
219.88 kB
Size
52.99 kB
File Count
8
NPM Version
10.1.0
Node Version
20.7.0
Published on
Mar 21, 2025
Cumulative downloads
Total Downloads
Last Day
-24.2%
46,178
Compared to previous day
Last Week
-13.1%
758,450
Compared to previous week
Last Month
6.3%
3,373,020
Compared to previous month
Last Year
90.8%
28,172,905
Compared to previous year
1
2
9
1
This is a plugin that lets you roll-up your .d.ts
definition files.
Install the package from npm
:
$ npm install --save-dev rollup-plugin-dts
Add it to your rollup.config.js
:
1import { dts } from "rollup-plugin-dts"; 2 3const config = [ 4 // … 5 { 6 input: "./my-input/index.d.ts", 7 output: [{ file: "dist/my-library.d.ts", format: "es" }], 8 plugins: [dts()], 9 }, 10]; 11 12export default config;
NOTE A default import of the plugin using import dts from "rollup-plugin-dts";
is still supported for existing implementations of this package. However, a named import is suggested to avoid the error [!] TypeError: dts is not a function
12 in certain rollup config file implementations.
And then instruct typescript where to find your definitions inside your package.json
:
1 "types": "dist/my-library.d.ts",
NOTE that the plugin will automatically mark any external library
(@types
for example) as external
, so those will be excluded from bundling.
This project is in maintenance mode. That means there will be no more active feature development. There will still be occasional releases to maintain compatibility with future TypeScript releases. Pull Requests are always welcome, however reaction time on both Issues and PRs can be slow.
While this plugin is fairly complete, it does not support all imaginable use-cases.
In particular, the plugin works best with already existing .d.ts
files generated
by the typescript compiler from idiomatic code.
Working with .ts(x)
or even .js(x)
(when setting allowJs: true
) does work,
but is not recommended.
The plugin does its own import resolution through the typescript compiler, and
usage together with other resolution plugins, such as node-resolve
can lead
to errors and is not recommended.
All external dependencies from node_modules
are automatically excluded from
bundling. This can be overridden using the respectExternal
setting, but it is
generally not recommended. While rollup of external @types
generally works,
it is not recommended.
Well, ideally TypeScript should just do all this itself, and it even has a proposal to do that. But there hasn’t been any progress in ~3 years.
Some projects, like rollup itself go the route of completely separating their public interfaces in a separate file.
See some discussions about some of these projects and their tradeoffs.
The code is licensed under the copyleft LGPL-3.0. I have no intention to license this under any non-copyleft license.
StackOverflow thread of issue ↩
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 7/29 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More