remove-webpack-plugin

1.2.2 • Public • Published

Remove Webpack Plugin

npm version

NPM

wercker status Package Quality

Plugin for webpack to remove directorys or files. (rm -r)

Installation

Install the plugin with npm:

npm install remove-webpack-plugin --save-dev

Examples Webpack Config

var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin('./public/')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], )
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], 'show')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], 'hide')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], 'fatal')
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], {
        errors: 'hide'
    })
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], {
        errors: 'show'
    })
  ]
}
var RemoveWebpackPlugin = require('remove-webpack-plugin');
 
module.exports = {
  plugins: [
    new RemoveWebpackPlugin(['./public/', './build/'], {
        errors: 'fatal'
    })
  ]
}

Usage

new RemoveWebpackPlugin(paths, ?settings)

Params

  • paths: Array || String
  • errors/settings: String("show" || "hide" || 'fatal')/Object{ errors: "show" || "hide" || "fatal"} default: "show"

License

MIT

Package Sidebar

Install

npm i remove-webpack-plugin

Weekly Downloads

212

Version

1.2.2

License

MIT

Last publish

Collaborators

  • aleksei0807