unplugin-dts
<h1 align="center">unplugin-dts</h1>
Last updated 2 months ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install unplugin-dts 
SYNC missed versions from official npm registry.

unplugin-dts

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

version license

Installation

pnpm i -D unplugin-dts

Quick Start

import dts from 'unplugin-dts/vite'

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

Supports Vite, Rollup, Rolldown, Webpack, Rspack and Esbuild.

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.

For dual ESM/CommonJS declarations, explicitly configure two outDirs entries with moduleFormat: 'esm' and moduleFormat: 'cjs'. With bundleTypes, each entry is bundled once and the self-contained result is reused for both declaration formats. Configure conditional exports.types entries separately in package.json.

Documentation

Example

A real project using this plugin: Vexip UI.

License

MIT License.

Current Tags

  • 1.0.0-beta.0                                ...           beta (2 years ago)
  • 1.1.2                                ...           latest (2 months ago)

15 Versions

  • 1.1.2                                ...           2 months ago
  • 1.1.1                                ...           2 months ago
  • 1.1.0                                ...           3 months ago
  • 1.0.3                                ...           5 months ago
  • 1.0.2                                ...           6 months ago
  • 1.0.1                                ...           6 months ago
  • 1.0.0                                ...           7 months ago
  • 1.0.0-beta.6                                ...           a year ago
  • 1.0.0-beta.5                                ...           a year ago
  • 1.0.0-beta.4                                ...           a year ago
  • 1.0.0-beta.3                                ...           a year ago
  • 1.0.0-beta.2                                ...           a year ago
  • 1.0.0-beta.1                                ...           a year ago
  • 1.0.0-beta.0                                ...           2 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 27
Today 0
This Week 0
This Month 15
Last Day 0
Last Week 0
Last Month 6
Dependencies (9)
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE