back to home

Swatinem / rollup-plugin-dts

A rollup plugin to generate .d.ts rollup files for your typescript project

View on GitHub
867 stars
83 forks
15 issues
TypeScriptJavaScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing Swatinem/rollup-plugin-dts in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/Swatinem/rollup-plugin-dts)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

rollup-plugin-dts This is a plugin that lets you roll-up your definition files. Usage Install the package from : $ npm install --save-dev rollup-plugin-dts Add it to your : **NOTE** A default import of the plugin using is still supported for existing implementations of this package. However, a named import is suggested to avoid the error [^1][^2] in certain rollup config file implementations. And then instruct typescript where to find your definitions inside your : **NOTE** that the plugin will automatically mark any external library ( for example) as , so those will be excluded from bundling. Options Maintenance Mode 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. What to expect While this plugin is fairly complete, it does not support all imaginable use-cases. In particular, the plugin works best with already existing files generated by the typescript compiler from idiomatic code. Working with or even (when setting ) 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 can lead to errors and is not recommended. All external dependencies from are automatically excluded from bundling. This can be overridden using the setting, but it is generally not recommended. While rollup of external generally works, it is not recommended. Why? 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. Alternatives • API Extractor • dts-bundle-generator • rollup-plugin-ts • tsc-prog See some discussions about some of these projects and their tradeoffs. How does it work License The code is licensed under the copyleft **LGPL-3.0**. I have no intention to license this under any non-copyleft license. [^1]: StackOverflow thread of issue [^2]: Github issue