Skip to content

tonyx106/clean-built-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version dependencies

clean-built-webpack-plugin

A webpack plugin to clean your built directory before compiling.

It is a better alternative to clean-webpack-plugin, because it supports files ignoring.

Getting started

To begin, you need install it.

npm i -D clean-built-webpack-plugin

Next, add plugin to your config, ex.:

// webpack.config.js
const CleanPlugin = require('clean-built-webpack-plugin');

const config = {
  plugins: [
    new CleanPlugin()
  ]
}

module.exports = config;

Configuring

Name Type Default Description
ignore string[] [] The array of files to ignore (see supported paterrns)
verbose boolean false If true, writes logs to console (always enabled if dry or force is true)
dry boolean false If true, simulates the removing and see what would be deleted
force boolean false If true, allows deleting files outside current working directory
event 'before' 'after' 'before'
include string[] ['*'] The array of files to remove (if not specified, remove all files excluding specified in ignore)

About

A webpack plugin to clean your built directory before compiling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published