babel / babel-preset-env

PSA: this repo has been moved into babel/babel -->

Home Page:https://github.com/babel/babel/tree/master/packages/babel-preset-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block scope transform not included when targeting Safari 10

ssilve1989 opened this issue · comments

commented

Specifying a target of "safari >= 10" doesn't use the transform-es2015-block-scoping plugin. Yet Safari 10 does need this because of this bug.

Ex:

{
  let a = 3
}

let a = 3

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.

@ssilve1989 thanks for the report! since we source our mappings via compat-table, mind reporting this over there?

This issue has been moved to babel/babel#6605.