webpack uglifyjs (not working: max call stack size exceeded)
This commit is contained in:
@@ -5,21 +5,41 @@ const merge = require('webpack-merge')
|
|||||||
const baseConfig = require('./webpack.config.base')
|
const baseConfig = require('./webpack.config.base')
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
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, {
|
module.exports = merge(baseConfig, {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
output: {
|
output: {
|
||||||
publicPath: '/'
|
publicPath: '/'
|
||||||
},
|
},
|
||||||
optimization: {
|
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: {
|
splitChunks: {
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
commons: {
|
commons: {
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
name: "vendor",
|
name: "vendor",
|
||||||
chunks: "all",
|
chunks: "all",
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|||||||
Reference in New Issue
Block a user