blob: 92d6803622c45d5718e4655c299a128f6a3167ed (
plain)
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
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const common = require('./webpack.common.js')
const webpack = require('webpack')
const { merge } = require('webpack-merge')
module.exports = merge(common, {
mode: 'production',
stats: 'errors-only',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [
new TerserPlugin(
{
extractComments: false
}
),
new CssMinimizerPlugin({
minimizerOptions: {
preset: [ 'default', { discardComments: { removeAll: true } } ],
},
}),
]
}
})
|