Hacker News new | ask | show | jobs
by mattkrea 3816 days ago
Node 4/5 (really arrow functions alone) largely eliminated the need for Babel on backend code IMO.
1 comments

To some extent, yes. In some of my projects I decided to avoid using Babel and just limit myself to Node's (new) features. The advantages of not having a build step for the backend js is sometimes worth it.

However, there are so many cases where Babel is useful, or turns out to be 'necessary', that I'm considering just using Babel by default again.

Some examples:

  - JSX for using React in the back-end (almost a default for me nowadays)  
  - async/await for async-heavy code  
  - a miscellaneous few still-unsupported ES2015 features that   occasionally are sorely missed
And finally, it's happing more and more regularly that I end up wanting to use some server-side modules on the client-side, in which case I need to set up Babel anyways.

That said, if I'm pretty sure I'm not going to need Babel, I still try to leave it out. It adds complexity that I'd rather avoid.