vite-plugin-cleaned
v1.0.29
Published
用于构建前清理上次构建的产物
Downloads
14
Readme
Introduce
用于构建前清理上次构建的产物
Install
pnpm install vite-plugin-clean -D
Usage
import { defineConfig } from 'vite'
import vitePluginClean from 'vite-plugin-clean'
export default defineConfig({
plugins: [
vitePluginClean()
]
})
API
options
export type PluginOptions = {
folder: string | string[]
hooks?: {
buildStart?: () => void | Promise<void>
closeBundle?: () => void | Promise<void>
}
}
example
export default defineConfig({
plugins: [
vitePluginClean({
folder: 'dist', // default: dist or ['dist'] or ['dist', 'lib']
hooks: {
buildStart() {
console.log('build start')
}
}
})
]
})