add clean-webpack-plugin

This commit is contained in:
Vu Nguyen
2021-01-15 20:22:53 -06:00
parent ed7d26fb65
commit faf2727b51
4 changed files with 153 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
import * as path from 'path';
import * as webpack from 'webpack';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
export default (): webpack.Configuration[] => {
const cfgs: webpack.Configuration[] = [];
@@ -19,7 +20,7 @@ export default (): webpack.Configuration[] => {
filename: '[name].js',
path: path.join(__dirname, 'dist', 'chrome'),
},
plugins: [],
plugins: [new CleanWebpackPlugin()],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},