Skip to content

hiNISAL/clean-before-output-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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

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

About

在webpack输出文件之前删除目录的plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published