Skip to content

zech126/vite-plugin-generatetypefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

说明

用于 vite 生成 ***.d.ts 文件

安装

yarn add vite-plugin-generatetypefile -D

npm i vite-plugin-generatetypefile -D

cnpm install vite-plugin-generatetypefile -D

vite 使用

  import { defineConfig } from 'vite';
  import vue from '@vitejs/plugin-vue';
  import vitePluginGenerateTypeFile from "vite-plugin-generatetypefile";

  export default defineConfig({
    plugins: [
      vue(),
      vitePluginGenerateTypeFile()
    ]
  })
  // 或
  export default defineConfig({
    plugins: [
      vue(),
      vitePluginGenerateTypeFile({
        disable: false,
        files: ['src/**/*.ts'],
        tsConfigFilePath: './tsconfig.json',
        outDir: 'dist',
        allowJs: true,
        declaration: true,
        emitDeclarationOnly:true,
        noEmitOnError:true,
        skipAddingFilesFromTsConfig: true,
        success: () => {}
      })
    ]
  })

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published