- Babel是一个广泛使用的转码器,可以将ES6代码转为ES5代码,从而在现有环境执行。
- https://babeljs.io/
- 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. Here are the main things Babel can do for you:
- Transform syntax
- Polyfill features that are missing in your target environment (through a third-party polyfill such as core-js)
- Source code transformations (codemods)
- And more!