Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments.
What is Babel and why use it?
Babel is a free and open-source JavaScript transcompiler that is mainly used to convert ECMAScript 2015+ (ES6+) code into a backwards compatible version of JavaScript that can be run by older JavaScript engines. ... Babel plugins are used to transform syntax that is not widely supported into a backwards-compatible version.
When should I use Babel?
You must use Babel to be sure that everyone will be able to run your code, else you can develop without it.
...
If you want to:
...
If you want to:
- use modules (with require() or import ... )
- use JSX.
- support a lot of browsers.
- use more advanced features (async/await), some still in proposals (decorators, class properties..)