Commit c2fe2aab authored by JC Brand's avatar JC Brand

Fix webpack issue where copied font files get removed

parent ed411c22
......@@ -4,11 +4,8 @@ const prod = require("./webpack.prod.js");
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ASSET_PATH = process.env.ASSET_PATH || '/dist/'; // eslint-disable-line no-process-env
module.exports = merge(prod, {
output: {
publicPath: ASSET_PATH,
filename: 'converse.js',
},
optimization: {
......@@ -17,8 +14,5 @@ module.exports = merge(prod, {
devtool: 'source-map',
plugins: [
new MiniCssExtractPlugin({filename: '../dist/converse.css'}),
new webpack.DefinePlugin({ // This makes it possible for us to safely use env vars on our code
'process.env.ASSET_PATH': JSON.stringify(ASSET_PATH)
})
],
});
......@@ -14,8 +14,10 @@ module.exports = merge(common, {
filename: 'converse.min.js',
},
plugins: [
new CleanWebpackPlugin({
cleanStaleWebpackAssets: false // resolves conflict with CopyWebpackPlugin
}),
new MiniCssExtractPlugin({filename: '../dist/converse.min.css'}),
new CleanWebpackPlugin(),
new CopyWebpackPlugin([
{from: 'images/favicon.ico'},
{from: 'images/custom_emojis', to: 'custom_emojis'},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment