A vite plugin to remove/clean your build folder(s).
npm i --save-dev vite-plugin-clean
yarn add --dev vite-plugin-clean
Here's an example vite config illustrating how to use this plugin
vite.config.js
import cleanPlugin from 'vite-plugin-clean';
export default {
plugins: [cleanPlugin()],
}
You can pass a hash of configuration options to vite-plugin-clean
.
Allowed values are as follows:
Name | Type | Default | Description |
---|---|---|---|
targetFiles |
{Array.<string>} |
['dist'] |
List of directories removed before packing the file |
Here's an example vite config illustrating how to use these options
vite.config.js
import cleanPlugin from 'vite-plugin-clean';
export default {
plugins: [cleanPlugin(
{
targetFiles: ['dist', 'test']
}
)],
}
If you encounter some problems during use, please click here Issue Report
Copyright (c) 2022-present flyfox