webpack config make limit TerserPlugin to parallel: 4

This commit is contained in:
BryceLTaylor 2022-01-28 16:56:46 -05:00
parent eacdcdb870
commit 7238d57354

View file

@ -8,6 +8,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
// PostCss
const autoprefixer = require('autoprefixer');
@ -141,7 +142,14 @@ module.exports = {
minChunks: pageRoutes.length // Extract only chunks common to all html pages
}
}
}
},
minimize: true,
minimizer: [
new TerserPlugin({
parallel: 4
})
]
},
plugins: [
new MiniCssExtractPlugin(),