I love ES6 syntax and this new object oriented stylish approach, which is easier for me to code that way. But it's just a preference, because I'm new to JavaScript. I just want to know the pros and cons of using Babel in terms of performance (if any) and maintenance in the future, readability, etc.... Thank y'all!
Asked
Active
Viewed 5,729 times
2 Answers
2
ES6 syntax will be supported for the foreseeable future. That is the nature of standards.
A common reason Babel is frequently involved in the build process for Node webapps is that Babel allows us to easily compile ES6 code to older versions (usually ES5), because it has better browser support.
For a purely server-side app, there is no reason, other than maybe slight performance gains, to compile to ES5.

Jason Warta
- 430
- 5
- 8
0
Seems like a duplicate. Is it okay to use babel-node in production
You could use babel-node in development, and then transpile your ES6 to ES5 for production if you are worried about performance.

jens
- 2,075
- 10
- 15