-
-
Notifications
You must be signed in to change notification settings - Fork 159
Edge 14 doesn't get block scoping detected #207
Comments
@mgol probably an issue where we're not assuming edge >= 12 includes everything from ie 11, and the compat-table data only lists ie11 under const/let, we'll get a fix out! |
I was thinking that might have been the case but IE 11 doesn't pass all const/let-related tests so it's not included under |
Oh, you mean that some tests under That would mean Edge is not listed under anything that was partially (but not fully) supported in IE 11. That seems to be the case, indeed, as e.g. Edge is missing from |
Yeah, we need to augment our checks to include previous browser(s) in the same family (ex. Chakra). |
For reference, this is relevant upstream compat-table code taking the family into account: |
If you have time to check this out it would be great @mgol All the code to generate the json files are in https://github.com/babel/babel-preset-env/blob/master/scripts/build-data.js. Maybe we need to redo #86? |
I can look into it. |
Edge 14 passes all tests in the Kangax ES6 table in the
const
&let
sections:http://kangax.github.io/compat-table/es6/
However, specifying
Edge >= 14
as a target still transpilesconst
tovar
:https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=env&targets=&browsers=Edge%20%3E%3D%2014&builtIns=false&experimental=false&loose=false&spec=false&playground=false&code=const%20x%20%3D%202%3B%0A
I've looked at the code base. This is what I found:
es2015-block-scoping
transform: https://github.com/babel/babel-preset-env/blob/v1.2.1/data/plugins.json#L20-L27es2015-block-scoping
transform seems to rely only on the results ofconst
&let
tests if I undersdand the code correctly: https://github.com/babel/babel-preset-env/blob/v1.2.1/data/plugin-features.js#L13-L18It seems to me all conditions for Edge 14 to be accepted should be met?
The text was updated successfully, but these errors were encountered: