esnext / es6-module-transpiler

Tomorrow’s JavaScript module syntax today
http://esnext.github.io/es6-module-transpiler/
Other
1.21k stars 85 forks source link

[RFC] Add support for namespace imports #174

Closed eventualbuddha closed 9 years ago

eventualbuddha commented 9 years ago

cc @caridy @ericf @wycats @dherman

This adds support for namespace imports, i.e. import * as foo from 'foo'. The initial work was done by @caridy and I followed up to make it work with both the commonjs and bundle formatters. I am not yet satisfied with this branch. The biggest code smell is that I am having to cache the specifier names by forcing them to be computed before they are re-written. Other than that, here's some things I think we may need before we can merge:

Any other optimizations or static errors you all can think of?

caridy commented 9 years ago

it looks good to me, let me know when you merge it to try it out with the other formatters.

eventualbuddha commented 9 years ago

Released in v0.9.0.