unplugin-dts
Bundler plugin that generates .d.ts declaration files across Vite, Rollup, Webpack, Rspack, and esbuild
Repository Health
Technical Analysis
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.vuefiles - Optional type bundling into a single declaration file via Microsoft’s API Extractor (
bundleTypes: true) - Migration documentation from
vite-plugin-dtsv4/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.tsfiles 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.tsentry 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 35 apps in this directory
likec4
Developer Tools · Devops
Define your software architecture as code and get always up-to-date, interactive C4 diagrams generated automatically from a DSL.
Magic
AI Agents · Automation · Low Code Platforms
Magic is an enterprise-grade open-source AI agent platform combining a generalist AI agent, workflow engine, IM, and collaborative office system for running an AI-powered digital workforce.
Mastra Code
AI Code Assistants
"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.
Metabase
Analytics
The open-source BI platform that lets anyone ask questions and build dashboards without writing SQL — with an embedded analytics SDK and AI-powered query assistant included.
n8n
Automation · No Code Platforms
Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.
Notesnook
File Storage · Note Taking · Security
End-to-end encrypted, open-source note-taking where your data stays yours — even from the server.
OpenHands
AI Code Assistants · AI Development
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.
page-agent
AI Agents · Automation
Control any web interface with natural language — no browser extension, no headless browser, just a JavaScript script tag.
Penpot
Design Tools
Open-source design platform with GPU-accelerated canvas, native design tokens, and MCP-powered AI workflows for teams that ship fast.