Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OT: is it me or is Babel incredibly slow in translating ES6 to regular JS?


It is. Try enabling the `compact` option or using something like Buble [1].

[1]: https://buble.surge.sh


I use buble. It transpiles ES6 to ES5 2.5 times faster than babel on average. But be aware that buble is still a work in progress and only supports a subset of ES6 features. A very usable subset, but a subset nonetheless.


And has it progress it will be slower to handle the most complex cases and follow the spec, than they will use a plugin architecture to let users develop their own language extension and modularize it, than they will only have to rename it to Babel because it won't be different.


The buble project wouldn't exist if babel ran faster and worked out of the box without setting up confusing config files. It fills a need.


Interesting. Is Buble compatible with Babel? I.e., can you call functions in Babel-compiled code from Buble-compiled code, and vice versa?


Yes. They both just lower the code to ES5 syntax without introducing any incompatible constructs.


Worth checking if there's a huge .babel.json cache file in your home directory and deleting it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: