JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2355329
  • Score
    100M100P100Q205409F

A webpack plugin to remove your build folder(s) before building

Package Exports

  • clean-webpack-plugin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clean-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Clean for webpack

A webpack plugin to remove/clean your build folder(s) before building

Build Status Coveralls Status

Installation

npm install clean-webpack-plugin --save-dev

Example Webpack Config

var CleanWebpackPlugin = require('clean-webpack-plugin');

module.exports = {
  plugins: [
    new CleanWebpackPlugin(['dist', 'build'], {
      root: '/full/project/path',
      verbose: true, 
      dry: false,
      exclude: ['shared.js']
    })
  ]
}

Usage

new CleanWebpackPlugin(paths [, {options}])

Paths (Required)

An [array] of string paths to clean

['dist', 'build']

Options and defaults (Optional)

{
  "root": "[location of webpack.config]", // An absolute path for the root.
  "verbose": true, // Write logs to console.
  "dry": false, // Do not delete anything, good for testing.
  "exclude": ["files", "to", "ignore"] // Instead of removing whole path recursively,
                                       // remove all path's content with exclusion of provided immediate children.
                                       // Good for not removing shared files from build directories.
}

License

http://www.opensource.org/licenses/mit-license.php