blob: ba0f95e9befc3f59fce7755fe40f620c635e33fa (
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
27
28
29
|
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',
output: {
publicPath: undefined
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin(
{
extractComments: false
}
),
new CssMinimizerPlugin({
minimizerOptions: {
preset: [ 'default', { discardComments: { removeAll: true } } ],
},
}),
]
}
})
|