When using npm build we have an error: ERROR in main.bundle.js from UglifyJs
In case anybody else is as confused as I was an hour ago:
uglify-js has never supported ES6
uglify-es supports ES6 but was abandoned
tercer is a fork of uglify-es that is under active development
uglifyjs-webpack-plugin went from using uglify-js (no ES6) under the hood, to uglify-es (yes ES6), back to uglify-js (no ES6), and now uses tercer (yes ES6).
If you, like me, ever manually made an instance of uglifyjs-webpack-plugin in your config (probably to specify non-default options), you briefly had ES6 support but it went away again through no fault of your own. Switch to tercer-webpack-plugin, rename uglifyOptions to tercerOptions, and everything will probably be fine.
When using npm build we have an error:
ERROR in main.bundle.js from UglifyJs