Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vite-dts-plugin

silverwind148BSD-2-Clause1.1.1TypeScript support: included

Vite plugin to generate type definitions

readme

vite-dts-plugin

Vite plugin to generate typescript definitions, with zero dependencies

Usage

vite.config.js

import {defineConfig} from "vite";
import {dtsPlugin} from "vite-dts-plugin";

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

Options

  • tsc: Name of the tsc binary, default tsc.
  • outDir: Output directory. Default: dist.
  • tsConfig: Custom tsconfig as a string. Default: undefined.
  • args: Additional arguments passed to tsc. Default: [].