Skip to content

ryo-gk/vite-plugin-virtual-dts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ffc4e6d · Feb 19, 2023

History

17 Commits
Jan 27, 2023
Feb 18, 2023
Jan 20, 2023
Jan 29, 2023
Feb 19, 2023
Jan 21, 2023
Jan 20, 2023
Jan 20, 2023
Feb 5, 2023
Feb 9, 2023
Jan 27, 2023
Feb 19, 2023
Feb 19, 2023
Jan 29, 2023
Jan 27, 2023
Feb 19, 2023

Repository files navigation

Vite Plugin Virtual Dts

How to use

Install package.

> npm install -D vite-plugin-virtual-dts

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published