Babel 介绍

Babel是什么?

ECMAScript 6 是一个泛指,含义是5.1版本后的JavaScript的下一代标准,涵盖了ES2015, ES2016, ES2017等。
Babel转码器是一个广泛使用的ES6转码器,可以将ES6转码为ES5。
简单来说,Babel 用于转化你的 JavaScript 代码。

Babel 功能介绍

Babel 是一个转换编译器,它能将 ES6 转换成可以在浏览器中运行的代码。Babel 可以处理 ES6 的所有新语法,并且内置了 React JSX 扩展及 Flow 类型注解支持。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|:-------------------------:|:--------------------------:|
| Arrow functions | Function bind |
| Async functions | Generators |
| Async generator functions | Modules |
| Block scoping | Module export extensions |
| Block scoped functions | New literals |
| Classes | Object rest/spread |
| Class properties | Property method assignment |
| Computed property names | Property name shorthand |
| Constants | Rest parameters |
| Decorators | Spread |
| Default parameters | Sticky regex |
| Destructuring | Template literals |
| Do expressions | Trailing function commas |
| Exponentiation operator | Type annotations |
| For-of | Unicode regex |
|:-------------------------:|:--------------------------:|

官网地址:http://babeljs.io/