5

From http://node.green/ 99% of ES2015 functionality is supported by NodeJS version 8.9.4. Does this mean that I don't need babel at all anymore?

Here's more details on what I'm trying to achieve:

  1. I'm talking only about server side code for NodeJS
  2. I want to use ES2015 features / syntax in my code.
  3. At this point, I'm not looking at ES2016 or ES2017. In other words, I'd be happy with using only ES2015.
  4. The 1% of features not available in Node 8.9.4 that Babel offers doesn't bother me either, since I'm sure the NodeJS team is working on integrating the remaining features and I'm confident that that will happen soon.

I have heard that transpiling code on the server-side can slow down development. I'm not sure what sort of effect it has on performance.

So here are my questions:

  1. Given what I have said above, do I still need Babel for any purpose? (If I'm not concerned about the 1% of ES2015 features that Node is yet to implement).
  2. If I still end up using Babel on the server-side, what sort of an effect will it have on development time and performance?
halfer
  • 19,824
  • 17
  • 99
  • 186
KaushikTD
  • 257
  • 3
  • 17

1 Answers1

3

As you said, Node.js supports a lots of ES2015 at this moment. But that's not the only factor to take in count.

The questions you have to ask yourself are :

  • Do I need to be fully compatible to ES2015 ?
  • Will I need in the future to be compatible to new norm ES2016, ES2017, ES2018 ... ?
  • Can I accept to rely on a plugin that's going to transpile my code ? You can have bugs related to Babel itself.
  • Do I have performance constraint ? if yes, does Babel improve or kill the performances ?

There is now, and there is tomorrow. Answer the questions and then take your decision understanding both good and bad points.

halfer
  • 19,824
  • 17
  • 99
  • 186
Orelsanpls
  • 22,456
  • 6
  • 42
  • 69