pinafore/webpack/terser.config.js
2019-10-08 07:57:37 -07:00

20 lines
398 B
JavaScript

const TerserWebpackPlugin = require('terser-webpack-plugin')
module.exports = () => new TerserWebpackPlugin({
exclude: /tesseract-asset/,
cache: !process.env.TERSER_DISABLE_CACHE,
parallel: true,
sourceMap: true,
terserOptions: {
ecma: 8,
mangle: true,
compress: {
pure_funcs: ['console.log']
},
output: {
comments: false
},
safari10: true
}
})