1.0.9 • Published 4 months ago
@skyfox2000/vite-plugin-auto-import-dts v1.0.9
vite-plugin-auto-import-dts
A Vite plugin to auto-import and manage TypeScript declarations.
Installation
npm install @skyfox2000/vite-plugin-auto-import-dts --save-dev
Usage
// vite.config.ts
import autoImportDTS from "@skyfox2000/vite-plugin-auto-import-dts";
export default {
plugins: [
autoImportDTS({
path: "./src/views",
target: "./src/types/global.d.ts"
})
]
};
Options
This plugin accepts the following configuration options:
Option | Type | Default | Description |
---|---|---|---|
path | string | './src/views' | The directory or directories to scan for .d.ts files. You can specify a single directory or an array of paths. |
target | string | './src/types/global.d.ts' | The target file where the generated global type declarations will be stored. If the target path does not exist, an error will be thrown. Make sure to manually create the necessary directories. |