Quellcode durchsuchen

Add the clean-webpack-plugin

JC Brand vor 5 Jahren
Ursprung
Commit
98963366b7
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      webpack.prod.js

+ 2 - 1
webpack.prod.js

@@ -3,9 +3,9 @@ const common = require("./webpack.common.js");
 const merge = require("webpack-merge");
 const path = require('path');
 const webpack = require('webpack');
+const { CleanWebpackPlugin } = require('clean-webpack-plugin');
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const CopyWebpackPlugin = require('copy-webpack-plugin');
-
 const ASSET_PATH = process.env.ASSET_PATH || '/dist/'; // eslint-disable-line no-process-env
 
 module.exports = merge(common, {
@@ -15,6 +15,7 @@ module.exports = merge(common, {
     },
     plugins: [
         new MiniCssExtractPlugin({filename: '../dist/converse.min.css'}),
+        new CleanWebpackPlugin(),
         new CopyWebpackPlugin([
             {from: 'images/favicon.ico'},
             {from: 'images/custom_emojis', to: 'custom_emojis'},