Closed d0ruk closed 7 years ago
It's because UglifyJS can't handle ES2015 features like fat arrow. We aim for Node.js though, not the browser. You can find a more detailed explanation here https://github.com/sindresorhus/ama/issues/446.
If you use Webpack, check out babel-engine-plugin
, which transpiles only the dependencies that needs to be transpiled.
Hello,
Here is my UglifyJsPlugin config;
Here's the error I get;
Even If I completely remove the options, (new UglifyJS()) minification still errors out.
The line it yells at;
which seems perfectly OK to me.
Do you have any solution besides switching my uglifyJS method? That is the only idea I'm left with.