Skip to content
프로젝트

qmhc/unplugin-dts has 1,535 GitHub stars and 112 forks. GitHot measured 0 stars in 24 hours and +3 in 7 days. Last checked 2026-11-14 11:13 UTC. Last push 2026-11-04.

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+3
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

소개

An unplugin for generating declaration (dts) files.

웹 및 앱

README.md

Original

unplugin-dts

An unplugin that generates declaration files (*.d.ts) from .ts(x) or .vue source files when using library mode.

version version license

It evolved from vite-plugin-dts, and after being rewritten with unplugin, it has become more versatile.

English | 中文

Installation

Requires Node.js >= 20.

pnpm i -D unplugin-dts

Previous only for Vite (not recommend):

pnpm i -D vite-plugin-dts

Quick Start

import dts from 'unplugin-dts/vite'

export default defineConfig({
  plugins: [dts()],
})

Supports Vite, Rollup, Rolldown, Webpack, Rspack and Esbuild. See Usage for detailed bundler setup.

When moduleFormat is omitted, the plugin preserves TypeScript's declaration extensions: .ts → .d.ts, .mts → .d.mts, and .cts → .d.cts, including declaration maps.

Declaration maps preserve absolute file:// source URLs, including Windows cross-drive paths, across all output directories.

To publish declarations for both ESM and CommonJS, configure both formats explicitly:

dts({
  outDirs: [
    { dir: 'dist', moduleFormat: 'esm' },
    { dir: 'dist', moduleFormat: 'cjs' },
  ],
  bundleTypes: true,
})

moduleFormat is not inferred from the bundler's JavaScript formats. The plugin writes the configured declaration variants, while conditional exports.types entries remain package metadata that you configure in package.json.

Documentation

  • Usage - Installation and bundler configuration
  • Options - Full plugin options reference
  • FAQ - Frequently asked questions and solutions
  • Migration (v4 → v5) - Migrating from vite-plugin-dts v4

Contributors

Thanks for all the contributions!

A real project using this plugin: Vexip UI.

License

MIT License.