An unplugin that generates declaration files (*.d.ts) from .ts(x) or .vue source files when using library mode.
> It evolved from vite-plugin-dts, and after being rewritten with unplugin, it has become more versatile.
**English** | [中文](./README.zh-CN.md)
## Installation
Requires **Node.js >= 20**.
```sh
pnpm i -D unplugin-dts
```
Previous only for Vite (not recommend):
```sh
pnpm i -D vite-plugin-dts
```
## Quick Start
```ts
import dts from 'unplugin-dts/vite'
export default defineConfig({
plugins: [dts()],
})
```
Supports Vite, Rollup, Rolldown, Webpack, Rspack and Esbuild. See [Usage](./docs/en/usage.md) for detailed bundler setup.
## Documentation
- [Usage](./docs/en/usage.md) - Installation and bundler configuration
- [Options](./docs/en/options.md) - Full plugin options reference
- [FAQ](./docs/en/faq.md) - Frequently asked questions and solutions
- [Migration (v4 → v5)](./docs/en/migration-v4-to-v5.md) - Migrating from vite-plugin-dts v4
## Contributors
Thanks for all the contributions!
A real project using this plugin: [Vexip UI](https://github.com/vexip-ui/vexip-ui).
## License
MIT License.