Open valpackett opened 10 years ago
@jlongster?
Any updates on this??
Sorry guys. I meant to come back to this and think hard about it. Initially I wasn't going to include module support, and leave that to other transpilers.
Since you've committed code though... I'll think about it. Modules are a big feature. I'm almost inclined to split it off into a separate project so that es6-macros focuses on the smaller features that we can simulate almost 100%.
Compiling modules this way is only getting at part of the ES6 features. You don't get live bindings and other stuff. But that's how all ES6->CJS compilers work, so it might be worth having. Let me get back to this in 1-2 weeks. Thanks!
Well, if you think it belongs in a separate project, I should be the one doing it, because I wrote the code ;-)
This patch adds support for latest ES6 module syntax, which is compiled to CommonJS. It uses the same convention for
default
as Square's es6-module-transpiler, ie.module.exports['default']
/require('something')['default']
.