forked from WeAreAthlon/frontend-webpack-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.config.js
33 lines (27 loc) · 869 Bytes
/
webpack.prod.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const webpackConfiguration = require('../webpack.config');
module.exports = merge(webpackConfiguration, {
mode: 'production',
/* Manage source maps generation process. Refer to https://webpack.js.org/configuration/devtool/#production */
devtool: false,
/* Optimization configuration */
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
parallel: true,
}),
new CssMinimizerPlugin(),
],
},
/* Performance treshold configuration values */
performance: {
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
/* Additional plugins configuration */
plugins: [],
});