remove-webpack-plugin

Plugin for webpack to remove directorys or files.

Usage no npm install needed!

<script type="module">
  import removeWebpackPlugin from 'https://cdn.skypack.dev/remove-webpack-plugin';
</script>

README

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