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
Block scope transform not included when targeting Safari 10 #6605
Comments
@ssilve1989 thanks for the report! since we source our mappings via compat-table, mind reporting this over there? |
@existentialism done |
This was resolved and merged in compat-table/compat-table#1183. I just ran into this issue when using @babel/preset-env when testing on Safari 10.1. |
@wessberg the compat table mapping shows: https://github.com/kangax/compat-table/blob/gh-pages/data-es6.js#L561
So |
I’ve made a simple repro: http://safari_10_1_repro.surge.sh/ with the following code: function func(a = 1) {
for (let a = 2; ;) {
break;
}
}
func(); I’ve tested it in Safari 10.1 and can confirm that it doesn’t work. We get I have updated the old issue on the |
@wessberg thanks! |
It has been fixed and merged into compat-table! |
Specifying a target of
"safari >= 10"
doesn't use thetransform-es2015-block-scoping
plugin. Yet Safari 10 does need this because of this bug.Ex:
is an error in Safari 10.1.2 resulting in
SyntaxError: Can't create duplicate variable that shadows a global property: 'a'
.I've had to manually include this plugin in the
include
option to get Safari working.The text was updated successfully, but these errors were encountered: