Commit 3b49eee8 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Add and enable Terser minification

parent c730d2cb
......@@ -28,6 +28,7 @@
"sass-loader": "^6.0.7",
"snapsvg": "^0.5.1",
"style-loader": "^0.20.3",
"terser-webpack-plugin": "^1.2.1",
"typeface-ubuntu": "^0.0.65",
"url-loader": "^0.6.2",
"webpack": "^4.29.0",
......
......@@ -2,6 +2,7 @@ const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
module.exports = {
entry: {
......@@ -69,7 +70,12 @@ module.exports = {
],
optimization: {
minimizer: [
new OptimizeCSSAssetsPlugin({})
new OptimizeCSSAssetsPlugin(),
new TerserPlugin({
cache: true,
parallel: true,
sourceMap: true
})
],
splitChunks: {
chunks: 'all'
......
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