vite-plugin-clean
v1.0.0
Published
A vite plugin to remove/clean your build folder(s).
Downloads
6,747
Maintainers
Readme
vite-plugin-clean
A vite plugin to remove/clean your build folder(s).
Table of Contents
Installation
npm i --save-dev vite-plugin-clean
yarn add --dev vite-plugin-clean
Usage
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']
}
)],
}
Issues
If you encounter some problems during use, please click here Issue Report
License
Copyright (c) 2022-present flyfox