2018-12-16 01:36:36 +00:00
|
|
|
const TerserWebpackPlugin = require('terser-webpack-plugin')
|
|
|
|
|
2019-09-21 20:44:32 +00:00
|
|
|
module.exports = () => !process.env.DEBUG && new TerserWebpackPlugin({
|
2019-08-26 01:33:44 +00:00
|
|
|
exclude: /tesseract-asset/,
|
2018-12-16 01:36:36 +00:00
|
|
|
cache: true,
|
|
|
|
parallel: true,
|
|
|
|
sourceMap: true,
|
|
|
|
terserOptions: {
|
2019-08-26 01:33:44 +00:00
|
|
|
ecma: 8,
|
2018-12-16 01:36:36 +00:00
|
|
|
mangle: true,
|
|
|
|
compress: {
|
|
|
|
pure_funcs: ['console.log']
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
comments: false
|
|
|
|
},
|
|
|
|
safari10: true
|
|
|
|
}
|
|
|
|
})
|