-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Object rest and function scope #3749
Comments
This comment is relevant: esbuild/internal/js_parser/js_parser_lower.go Lines 284 to 313 in 51f67d4
|
esbuild considers scope to be more important than side effect order. |
Thank you for the clear comments in esbuild. |
Yes, makes sense. Thanks for the report. When I get the time to think about this, I'll have to load this back in my head to figure out what to do about it, if anything. That comment (and any relevant surrounding commit logs from then) will be a good starting point for me. |
Playground
https://esbuild.github.io/try/#dAAwLjIwLjIALS10YXJnZXQ9Y2hyb21lNTkAZnVuY3Rpb24gYSgpIHsKICBjb25zb2xlLmxvZygiYSIpOwogIHJldHVybiAiYSI7Cn0KCmZ1bmN0aW9uIGIoKSB7CiAgY29uc29sZS5sb2coImIiKTsKICByZXR1cm4gImIiOwp9CgpmdW5jdGlvbiBjKCkgewogIGNvbnNvbGUubG9nKCJjIik7CiAgcmV0dXJuICJjIjsKfQoKZnVuY3Rpb24gZm9vKHsgYWEsIC4uLmJiIH0sIGNjID0gYWEoKSkgewogIGNvbnNvbGUubG9nKGFhLCBiYiwgY2MpCn0KCgoKZm9vKHsgYWE6IGEsIGJiOiBiLCBjYzogYyB9KQ
Input
with
--target=chrome59
Expected Result
print some function and objects.
Actual Result
Uncaught ReferenceError: aa is not defined
Relates issue
babel/babel#16470
The text was updated successfully, but these errors were encountered: