As Node V6 already supports ~95% of ES6, why are people using Babel on the server side? What are the pros and cons of using Babel on the server side?
There is one main reason: import / export
import
export
See:
There is even a special Babel preset for Node:
that doesn't transpile anything that Node already supports natively.
You can also use babel-preset-env which is "A Babel preset that can automatically determine the Babel plugins and polyfills you need based on your supported environments" - thanks to loganfsmyth for pinting it out in the comments. See:
babel-preset-env
And Node doesn't support ES6 modules - see this answer for details on why:
2.1m questions
2.1m answers
60 comments
57.0k users