2.0.4 • Published 4 years ago

@reactway/webpack-builder-plugin-clean v2.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@reactway/webpack-builder-plugin-clean

A plugin made for webpack-builder.

Getting started

$ 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();

Passing options

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();

Documentation

WIP

License

Released under the MIT license.