# 打包前先清空输出目录

npm i  clean-webpack-plugin -D

const {CleanWebpackPlugin} = require('clean-webpack-plugin');

// 使用插件
plugins:[
    new CleanWebpackPlugin({cleanOnceBeforeBuildPatterns: ['**/*', '!static-files*'],})
]
Last Updated: 12/4/2022, 12:29:31 PM