mikach / requirejs-babel

An AMD loader plugin for Babel
117 stars 32 forks source link

`for ...of` syntax doesn't work properly in es6 model #6

Closed leftstick closed 9 years ago

leftstick commented 9 years ago

The code snippet as following:

var years = [ 1954, 1974, 1990, 2006, 2010, 2014 ];
console.log([for (year of years)  year]);

exception as following:

  Uncaught SyntaxError: unknown: Unexpected token (5:13)
  3 | var years = [ 1954, 1974, 1990, 2006, 2010, 2014 ];
  4 | 
> 5 | console.log([for (year of years)  year]);
    |              ^

See plunker

leftstick commented 9 years ago

Not an issue, since i didn't enable the Experimental mode