1.2.2 • Published 5 years ago

clean-before-output-webpack-plugin v1.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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

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

1.2.2

5 years ago

1.2.0

5 years ago

1.0.0

5 years ago