Replace uglify with terser
Closed this issue · 4 comments
soreng commented
npm install terser-webpack-plugin --save-dev
npm uninstall uglifyjs-webpack-plugin
npm uninstall uglify-js
in webpack.config.js we replaced the uglify plugin, but retained the same options:
new TerserPlugin({
sourceMap: true,
terserOptions: {
ecma: 8,
mangle: false,
keep_classnames: true,
keep_fnames: true
}
})
hesselberg commented
@soreng how come we're doing this?
Dan9boi commented
@hesselberg actually what they say on github:
Why choose terser?
uglify-es is no longer maintained and uglify-js does not support ES6+.terser is a fork of uglify-es that mostly retains API and CLI compatibility with uglify-es and uglify-js@3.
hesselberg commented
@Dan9boi all good, just think its important we document/explain why we are doing things :-)