interface: clean dir before webpack build
const path = require('path');
// const HtmlWebpackPlugin = require('html-webpack-plugin');
-// const { CleanWebpackPlugin } = require('clean-webpack-plugin');
+const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
mode: 'production',
@@ -49,7 +49,7 @@ module.exports = {
// historyApiFallback: true
// },
plugins: [
- // new CleanWebpackPlugin(),
+ new CleanWebpackPlugin({ cleanOnceBeforeBuildPatterns: ['**/*', '!channel.js'] }),
// new HtmlWebpackPlugin({
// title: 'Hot Module Replacement',
// template: './public/index.html',
