ModuleLoader / es-module-loader

Polyfill for the ES Module Loader
MIT License
2.23k stars 185 forks source link

traceur alternative? #220

Closed stevenvachon closed 10 years ago

stevenvachon commented 10 years ago

Traceur is huge and its source is rather insane. Would it be possible to use something lighter such as es6now?

guybedford commented 10 years ago

Sorry to hear it's been tricky getting it to work with node-webkit. How has progress been on that? Traceur is large, and its source can appear chaotic to an outsider. But the codebase is solid, and the project incredibly mature for the space (much more mature than any other ES6 systems out there).

If you want to compile ES6 in alternative ways, you can use ES6 module transpiler to transpile modules only into something that can be interpreted by SystemJS, with a System.register output. There is a resolver for this - @caridy do you have the link for this project?

stevenvachon commented 10 years ago

Thanks, though I think that I've solved the node-webkit issue :smile: Posted a PR earlier. I am also interested in possibly excluding Traceur at runtime, though, to keep file size to a minimum. es6now came to mind, but I'm finding other issues with it, such as it will not run in the browser (for dev).

guybedford commented 10 years ago

Yes, you shouldn't use the full Traceur source in production. There is no good reason.

See https://github.com/ModuleLoader/es6-module-loader#moving-to-production for a workflow to build for Traceur runtime only. You can also do a single-file build in Traceur itself, and then you don't even need the module loader. Alternatively use SystemJS's build process if you are using ES6 along with AMD, CommonJS or global modules as well.

guybedford commented 10 years ago

Closing - happy to continue discussion.