user568109
user568109

Reputation: 48003

Does dart2js support ecmascript 6 compilation?

Does dart2js support compilation to ecmascript-6 version of javascript? How do you compile to it ? If not, is it planned ?

This raises another issue for js devs. If this is done would it rely on different set of shims to work with (dart2js generated) es5 code, other than ones used already (https://github.com/paulmillr/es6-shim/).

Upvotes: 2

Views: 456

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657466

No, it doesn't.
As long as not all browsers supported by Dart (or more concrete dart2js) support EcmaScript 6 this doesn't make much sense.

I see only two reasons why dart2js might support EcmaScript 6 at some time.

  • improved speed
    when browsers can execute ES constructs faster than equivalent ES5
    shims would decrease speed for every browser that doesn't support ES6
  • build output size
    when less JS code is needed to implement the same functionality
    shims would increase the size for every browser

Upvotes: 1

Related Questions