vite-plugin-virtual-dts
v0.1.0
Published
Generate declaration files for virtual module
Downloads
2
Maintainers
Readme
Vite Plugin Virtual Dts
How to use
Write config like below.
// vite.config.ts
import { defineConfig } from 'vite'
import demo from 'vite-plugin-demo`
import dts from 'vite-plugin-virtual-dts'
export default defineConfig({
plugins: [
vue(),
demo(),// assume this plugin creates the virtual module named `virtual:vite-plugin-demo`
dts({
targets: ['virtual:vite-plugin-demo'], // specify the name of virtual modules
outDir: './types' // specify the directory to generate d.ts files
})
],
})
Once you set the configurations correctly, a declaration file is generated during development.