Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UglifyJs: Change the ecma option from 8 to 5 #2092

Merged
merged 1 commit into from Aug 21, 2018
Merged

UglifyJs: Change the ecma option from 8 to 5 #2092

merged 1 commit into from Aug 21, 2018

Conversation

LubomirGeorgiev
Copy link
Contributor

Problem:

I recently had a problem with the ecma option of UglifyJs being set to 8.

One of my packages was using bn.js as a dependency and this block of code right here was compiled to return{a,b:f,gcd:i.iushln(c)}} and of course the a threw an SCRIPT1003: Expected ':' error in Internet Explorer because it doesn't support the new EcmaScript 6 Property Shorthand syntax. I had no idea what it was and how to fix it until I found this solution so that's why I am fixing it here in this repo.

Solution:

To change the ecma option of UglifyJS from 8 to 5 to ensure maximum compatibility with older browsers.

I think it's not very safe to keep it at 8 because not all browsers are fully EcmaScript 8 and even 6 compatible yet.

@retlehs retlehs merged commit b298b96 into roots:master Aug 21, 2018
@retlehs
Copy link
Sponsor Member

retlehs commented Aug 21, 2018

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants