2020-07-18 04:16:07 +03:00
|
|
|
const { merge } = require('webpack-merge')
|
2018-12-11 22:56:46 +03:00
|
|
|
const common = require('./webpack.common.js')
|
2020-07-07 10:18:43 +03:00
|
|
|
const TerserPlugin = require('terser-webpack-plugin');
|
2018-12-11 22:56:46 +03:00
|
|
|
|
2019-01-15 23:18:32 +03:00
|
|
|
module.exports = common.map(
|
|
|
|
config => merge(config, {
|
|
|
|
mode: 'production',
|
|
|
|
devtool: '#source-map',
|
2020-07-07 10:18:43 +03:00
|
|
|
// This is required to keep IE11 compatibility (see #21316)
|
|
|
|
optimization: {
|
|
|
|
minimize: true,
|
|
|
|
minimizer: [
|
|
|
|
new TerserPlugin({
|
|
|
|
terserOptions: {
|
|
|
|
output: {
|
|
|
|
keep_quoted_props: true,
|
|
|
|
},
|
|
|
|
},
|
2020-07-14 14:52:53 +03:00
|
|
|
sourceMap: true,
|
2020-07-07 10:18:43 +03:00
|
|
|
}),
|
|
|
|
],
|
|
|
|
},
|
2019-01-15 23:18:32 +03:00
|
|
|
})
|
|
|
|
)
|