unplugin-dts

Bundler plugin that generates .d.ts declaration files across Vite, Rollup, Webpack, Rspack, and esbuild

Tool
npm
v1.1.0
1,528stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
78/100Good
Development Activity76
Maintenance80
Community56
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
72/100Good
Architecture78
Code Quality72
Innovation66
Learning Curve70

unplugin-dts generates TypeScript declaration files (.d.ts) from .ts(x) and .vue source when building a library, and does it as a single plugin that works across Vite, Rollup, Rolldown, Webpack, Rspack, and esbuild via the unplugin abstraction. It’s the successor to vite-plugin-dts — the same author’s earlier, Vite-only plugin, whose README now explicitly tells users to switch to unplugin-dts — extending the same declaration-generation approach (with optional API Extractor-based type bundling) to every major bundler instead of being locked to Vite’s library mode.

Teams publishing a TypeScript library add it as a build plugin so consumers get accurate, source-following (or bundled) type declarations without a separate tsc --emitDeclarationOnly step wired into their build pipeline.

What You Get

  • One plugin package with per-bundler entry points (unplugin-dts/vite, /rollup, /webpack, /rspack, /esbuild) sharing a common core
  • Declaration generation that follows source file structure by default, for both .ts(x) and .vue files
  • Optional type bundling into a single declaration file via Microsoft’s API Extractor (bundleTypes: true)
  • Migration documentation from vite-plugin-dts v4/v5 for projects moving off the deprecated package
  • Works alongside library-mode builds to emit types matching the built JS output

Common Use Cases

  • Publishing a TypeScript library to npm with correct, versioned .d.ts files as part of the build
  • Migrating an existing vite-plugin-dts-based build to a bundler-agnostic setup
  • Generating declarations for a Vue component library alongside its compiled JS
  • Bundling scattered per-file declarations into a single .d.ts entry point for cleaner published packages
  • Switching a library’s build tool (e.g. Vite to Rspack) without switching declaration-generation plugins

Under The Hood

Architecture - Built on the unplugin framework, the package’s src/core holds bundler-agnostic declaration-generation logic, while thin per-bundler entry files (vite.ts, rollup.ts, webpack.ts, rspack.ts, esbuild.ts, rolldown.ts) adapt that core to each build tool’s plugin hook interface, so one implementation of TS-to-declaration generation is reused across six bundlers instead of being reimplemented per tool. Tech Stack - TypeScript, built with tsx/unbuild, using Microsoft’s @microsoft/api-extractor as an optional dependency for the type-bundling feature, and tested with Vitest across per-bundler playground projects (react-vite, vue-rspack, ts-webpack, etc.) in the monorepo. Code Quality - The monorepo enforces commitlint, ESLint, and Husky pre-commit hooks, has dedicated e2e playground projects per bundler for integration testing, and shows very active, well-maintained development (score 84 health, active commits as of the latest release); the core package itself has a comparatively small direct unit-test footprint, relying more on the playground/e2e projects for coverage. API Design - Sharing one dts() options object across bundler entry points (options.tsconfigPath, options.bundleTypes) keeps configuration familiar to anyone coming from vite-plugin-dts, and the explicit migration guide lowers switching cost; the tradeoff is that some options are bundler-specific under the hood even though the top-level API looks uniform, so edge cases can require reading the per-bundler docs.

Used by 33 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

166

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
30
Repo Health
70
Technical
63
Dependency
Built with
TypeScript76%
MDX18%
Updated 1 years ago
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,755

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python90%
Updated yesterday
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,884

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
61
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
99%
Apache 2.0

Bubble Lab

Automation · AI Development

1,094

Open-core workflow engine for building AI-powered automations in TypeScript that run natively inside Slack — no context switching required.

View details
36
Repo Health
78
Technical
71
Dependency
Built with
TypeScript99%
Updated 4 months ago
Java
73%
Other

ByteChef

Automation · AI Agents

1,000

Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.

View details
85
Repo Health
82
Technical
70
Dependency
Built with
Java73%
TypeScript26%
Updated yesterday
TypeScript
96%
Other

Cal.diy

Scheduling

48,218

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
95
Repo Health
86
Technical
65
Dependency
Built with
TypeScript96%
Updated yesterday
TypeScript
88%
MIT

Drawnix

Design Tools · Productivity

14,677

All-in-one open-source whiteboard combining mind maps, flowcharts, and freehand drawing on a single infinite canvas.

View details
74
Repo Health
69
Technical
80
Dependency
Built with
TypeScript88%
SCSS10%
Updated 2 days ago
TypeScript
94%
AGPL 3.0

Element Web

Team Chat · Collaboration

13,437

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
65
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
62%
Other

Flowise

Developer Tools · Automation · No Code Platforms

55,427

Drag-and-drop visual builder for AI agents, RAG pipelines, and multi-agent systems—deploy anywhere in minutes.

View details
86
Repo Health
77
Technical
63
Dependency
Built with
TypeScript62%
JavaScript27%
Updated 3 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search