From 85eff145d07315611b330ea03d5ba3e07d0dd622 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Wed, 15 Jul 2020 11:50:32 +0200 Subject: [PATCH] webpack uglifyjs (not working: max call stack size exceeded) --- build/webpack.config.prod.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/build/webpack.config.prod.js b/build/webpack.config.prod.js index a69473d..05b4f92 100644 --- a/build/webpack.config.prod.js +++ b/build/webpack.config.prod.js @@ -5,21 +5,41 @@ const merge = require('webpack-merge') const baseConfig = require('./webpack.config.base') const MiniCssExtractPlugin = require('mini-css-extract-plugin') +// const UglifyJSPlugin = require('uglifyjs-webpack-plugin') +// ERROR in vendor.js from UglifyJs +// RangeError: Maximum call stack size exceeded + module.exports = merge(baseConfig, { mode: 'production', output: { publicPath: '/' }, optimization: { + // minimizer: [ + // new UglifyJSPlugin({ + // uglifyOptions: { + // // Eliminate comments + // comments: false, + // // remove warnings + // warnings: false, + // minimize: false, + // mangle: false, + // compress: { + // // Drop console statements + // drop_console: true, + // } + // } + // }) + // ], splitChunks: { cacheGroups: { commons: { test: /[\\/]node_modules[\\/]/, name: "vendor", chunks: "all", - }, - }, - }, + } + } + } }, module: { rules: [