A small project I started make use a node module (installed via npm) that declares const variables. Running and testing this project is well, b
UglifyJS does not support es6. const is an es6 declaration, so it throws an error.
What is weird is that the package you use does not transpile its files to es5 to be used anywhere.
If you want to still use UglifyJS (to re-use the configuration for example) use the ES6+ compatible version, uglify-es. (Warning: uglify-es is now abandoned.)
And as Ser mentionned, you should now use terser-webpack-plugin.