clean-before-output-webpack-plugin

1.2.2 • Public • Published

clean-before-output-webpack-plugin

在webpack输出文件之前删除目录的plugin,仅在webpack4.x下测试可用

使用

npm i clean-before-output-webpack-plugin -D
// webpack config
const { resolve } = require('path');
const CleanBeforeOutputWebpackPlugin = require('clean-before-output-webpack-plugin');
 
module.exports = {
  // ...
  plugins: [
    new CleanBeforeOutputWebpackPlugin({
      path: resolve(__dirname, 'dist/'),
    }),
  ],
  // ...
};

参数

path

在输出文件前要删除的目录,需要绝对路径。

Readme

Keywords

Package Sidebar

Install

npm i clean-before-output-webpack-plugin

Weekly Downloads

3

Version

1.2.2

License

MIT

Unpacked Size

2.02 kB

Total Files

3

Last publish

Collaborators

  • nisal