A plugin made for webpack-builder.
$ npm i @reactway/webpack-builder-plugin-clean
Add plugin into webpack config by using use()
builder method.
const webpackBuilder = require("@reactway/webpack-builder");
const clean = require("@reactway/webpack-builder-plugin-clean");
module.exports = new webpackBuilder.Builder(__dirname, {
entry: "./src/app.js",
output: {
path: "./dist",
filename: "[name].bundle.js"
}
})
.use(clean)
.toConfig();
It is wrapped clean-webpack-plugin. All options you can pass from the wrapped package. Available options you can check at clean-webpack-plugin-options
const webpackBuilder = require("@reactway/webpack-builder");
const clean = require("@reactway/webpack-builder-plugin-clean");
module.exports = new webpackBuilder.Builder(__dirname, {
entry: "./src/app.js",
output: {
path: "./dist",
filename: "[name].bundle.js"
}
})
.use(clean, {
dry: true,
cleanStaleWebpackAssets: false,
...
})
.toConfig();
WIP
Released under the MIT license.