To use es6 in node: require('babel/register') at entry point of app. That's it! Google results for "es6 in nodejs" don't mention this.
-
-
Replying to @andrewray
@andrewray@bahmutov hi.. curious how this is different from doing node --harmony2 replies 0 retweets 0 likes -
Replying to @miranext
@miranext@andrewray@bahmutov babel transpiles your code to es5 which isn't what node harmony does1 reply 0 retweets 2 likes -
Replying to @knownasilya
@miranext@andrewray@bahmutov which is also why the above suggestion is slow, since it happens at runtime.1 reply 0 retweets 0 likes -
Replying to @knownasilya
@miranext@andrewray@bahmutov use babel-node bin or have a build step for better performance.1 reply 0 retweets 0 likes -
Replying to @knownasilya
@knownasilya babel-node uses babel/register@miranext@andrewray@bahmutov2 replies 0 retweets 2 likes -
Replying to @sebmck
@sebmck so really the most performant way is to build lib -> src and run from src?@miranext@andrewray@bahmutov1 reply 0 retweets 0 likes
@knownasilya As I said before, it uses a cache so you'll only get a small performance hit on first load. @miranext @andrewray @bahmutov
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 