Skip to content

The latest version 0.6.0 contains non-ES5 code #4

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

Closed
josdejong opened this issue Aug 7, 2019 · 4 comments
Closed

The latest version 0.6.0 contains non-ES5 code #4

josdejong opened this issue Aug 7, 2019 · 4 comments
Assignees

Comments

@josdejong
Copy link

When using the latest version of json-source-map in a project of mine, I can no longer minify my own project (using uglifyjs), I get the following error:

SyntaxError: Unexpected token: name «of», expected: punc «;»

This is because the published code of json-source-map contains non-ES5 code, it uses of:

for (var item of _data.entries()) {

is this intentional or accidental?

@epoberezkin
Copy link
Owner

This code will never execute in ES5 environment, but it won't parse with ES5 parsers indeed... This iterator should be just iterated manually then - I will update.

@epoberezkin epoberezkin self-assigned this Aug 7, 2019
@josdejong
Copy link
Author

thanks!

@epoberezkin
Copy link
Owner

it's in 0.6.1

@josdejong
Copy link
Author

👍

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

No branches or pull requests

2 participants