string-similarity
string-similarity copied to clipboard
incompatible with uglifyjs
Hello, I'm getting this when building the productio package
....... from UglifyJs Unexpected token: punc (,) ....
Perhaps there is a way to add build configuration to the package to fix this? I've gone around by copying the code in my utilities library. Thanks!
Don't know enough about Uglify, sorry. Does it support ES6? That might be the difference. Try using the latest version 1.x of string-similarity which is ES5 to verify.
uglify does not support es6, so I thought you might add a build config to transpile the code to es5...
Fair enough @evgenyfadeev, I'm open to any PRs for build config.
@aceakash @evgenyfadeev Actually, terser supports minification of ES6. :ok_hand: I've used it with rollup in scrolldir-observable.
From terser
Why choose terser? uglify-es is no longer maintained and uglify-js does not support ES6+. terser is a fork of uglify-es that retains API and CLI compatibility with uglify-es and uglify-js@3.
bump
es6 has been out for almost 5 years. why go through the trouble of supporting uglify-js? don't enable outdated code.
Isn't this PR adding support for ES6 with babel? Can it be merged?