Commit 34436b7f authored by JC Brand's avatar JC Brand

Add terser minifier for webpack

parent 98963366
...@@ -19,7 +19,6 @@ SASS ?= ./node_modules/.bin/node-sass ...@@ -19,7 +19,6 @@ SASS ?= ./node_modules/.bin/node-sass
SED ?= sed SED ?= sed
SPHINXBUILD ?= ./bin/sphinx-build SPHINXBUILD ?= ./bin/sphinx-build
SPHINXOPTS = SPHINXOPTS =
UGLIFYJS ?= node_modules/.bin/uglifyjs
XGETTEXT = xgettext XGETTEXT = xgettext
......
This diff is collapsed.
/* global __dirname, module */ /* global __dirname, module */
const path = require('path'); const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
bootstrap_ignore_modules = ['carousel', 'scrollspy']; bootstrap_ignore_modules = ['carousel', 'scrollspy'];
...@@ -16,6 +17,10 @@ module.exports = { ...@@ -16,6 +17,10 @@ module.exports = {
externals: [{ externals: [{
"window": "window" "window": "window"
}], }],
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
},
watchOptions: { watchOptions: {
ignored: [/dist/, /spec/, /.*\~/] ignored: [/dist/, /spec/, /.*\~/]
}, },
......
...@@ -11,9 +11,6 @@ module.exports = merge(prod, { ...@@ -11,9 +11,6 @@ module.exports = merge(prod, {
publicPath: ASSET_PATH, publicPath: ASSET_PATH,
filename: 'converse.js', filename: 'converse.js',
}, },
optimization: {
minimize: false,
},
devtool: 'source-map', devtool: 'source-map',
plugins: [ plugins: [
new MiniCssExtractPlugin({filename: '../dist/converse.css'}), new MiniCssExtractPlugin({filename: '../dist/converse.css'}),
......
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