1.0.0 • Published 2 years ago

vite-plugin-clean v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vite-plugin-clean

npm

A vite plugin to remove/clean your build folder(s).

Table of Contents

  1. Installation
  2. Usage
  3. Issues
  4. License

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:

NameTypeDefaultDescription
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

MIT

Copyright (c) 2022-present flyfox