3 ms·
I've been using babel to great effect on client-side apps which have to be transpiled/bundled anyway, but I've been avoiding it on the server side in an attempt
by wolfgang42 10y ago
I've been using babel to great effect on client-side apps which have to be transpiled/bundled anyway, but I've been avoiding it on the server side in an attempt to avoid the mental overhead of another item in the build toolchain. So far it hasn't been enough of an issue to warrant adding another tool, but I'm eagerly awaiting native async/await in NodeJS (scheduled for version 8 AFAIK).
- fzzzy 10y agoIt is available now in 7 behind a command line flag.
- wolfgang42 10y agoYes, but this comment[1] makes me nervous: > However, Node v7 is based on V8 54, whose async/await implementation has some bugs in it (including a nasty memory leak). I would not recommend using --harmony-async-await in production until upgrading to V8 55; the easiest way to achieve that would be to wait for Node 8. Also, I'd rather not use a non-LTS version in production since I don't want to have to keep track of changes. Most of the stuff I maintain sits untouched for months between releases; I think there might even be a few things still running on 0.10. [1]: https://github.com/nodejs/promises/issues/4#issuecomment-254159118 https://github.com/nodejs/promises/issues/4#issuecomment-254...
- fzzzy 10y agoThanks for the info! I'm still using babel on the server side for my side projects where I use async/await.
- deleted 10y ago[deleted]
- tracker1 10y agoI started using it a while ago now (around the time of the iojs split), as I was writing a lot of scripts to migrate/clone data between two systems. It saved a lot of what would have been more complicated code in the end...
- tracker1 10y agoYeah... I usually develop with babel-node (babel-cli), then do the transpile as part of the publish for integration/production... Which works out well enough imho. It's also not too hard to script[1] if you're doing that. The script itself is a work in progress, and will probably change it to stage-3 since I think everything I am interested in is at that stage at this point. [1] https://github.com/tracker1/react-redux-materialui-boilerplate/blob/master/scripts/build-server.js https://github.com/tracker1/react-redux-materialui-boilerpla...