asmcrypto / asmcrypto.js

JavaScript Cryptographic Library with performance in mind.
MIT License
661 stars 182 forks source link

minified version of asmcrypto.js fails to parse on Safari iOS #144

Closed crewjam closed 5 years ago

crewjam commented 6 years ago

Thanks for the great project. 👍

I ran in to trouble with the minified version of produced by package.json on Safari on iOS. The error in the console is:

SyntaxError: Cannot declare a let variable twice: 'f'.

The non-minified version parses and works just fine.

The user agent this fails with is Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G60 Safari/602.1

alippai commented 6 years ago

Indeed. I need to add transpilation and use uglify-js instead of uglify-es. Or maybe babel/minify is more stable.

Related: https://github.com/mishoo/UglifyJS2/issues/2842

alippai commented 6 years ago

It should work now with AsmCrypto 2.0. There are more bundles in the root now. Can you check it, please?