Merge pull request #6494 from BryceLTaylor/terserPlugin-parallelization

webpack config make limit TerserPlugin to parallel: 4
This commit is contained in:
Bryce Taylor 2022-02-01 14:29:26 -05:00 committed by GitHub
commit 5a50ea1eab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,12 @@ module.exports = {
minChunks: pageRoutes.length // Extract only chunks common to all html pages
}
}
}
},
minimizer: [
new TerserPlugin({
parallel: 4
})
]
},
plugins: [
new MiniCssExtractPlugin(),