Add the clean-webpack-plugin

This commit is contained in:
JC Brand 2020-02-13 14:30:29 +01:00
parent 2d57f6c889
commit 98963366b7

View File

@ -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'},