diff --git a/webpack.config.js b/webpack.config.js index 87a89ab73..6c704ad51 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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(),