3 ms·
One of the reasons this is so relatively simple is that it doesn't appear to handle cycles like es6-module-transpiler does. See the test case here: https://gi
by avolcano 12y ago
One of the reasons this is so relatively simple is that it doesn't appear to handle cycles like es6-module-transpiler does.
See the test case here:
https://github.com/thomasboyt/es6-cycles-comparison https://github.com/thomasboyt/es6-cycles-comparison
The es6-module-transpiler output functions correctly, while the Esperanto output does not. This means that while Esperanto can translate the syntax of ES6 modules for you, it doesn't currently match semantics like es6-module-transpiler does.
- rich_harris 12y agoInteresting, thanks for the test case - I believe I can add support for cycles with the current approach (though I'd put it behind an option, since get default() excludes older browsers), will work on it. This was a weekend project, using the examples from http://jsmodules.io/ http://jsmodules.io/ as a starting point. Not finished yet :-)
- avolcano 12y agoNo problem, just wanted to point out one of the reasons for the transpiler's relative verbosity :) There's lots of other good test cases here that should be adaptable: https://github.com/esnext/es6-module-transpiler/tree/master/test/examples https://github.com/esnext/es6-module-transpiler/tree/master/...
- rich_harris 12y agoThat's very useful, thank you.