@reactway/webpack-builder-plugin-clean
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

@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.

Package Sidebar

Install

npm i @reactway/webpack-builder-plugin-clean

Weekly Downloads

3

Version

2.0.4

License

MIT

Unpacked Size

11 kB

Total Files

9

Last publish

Collaborators

  • martynas-zilinskas
  • quatrodev
  • reactway-dev