-
Notifications
You must be signed in to change notification settings - Fork 152
/
.babelrc
93 lines (87 loc) · 2.09 KB
/
.babelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"presets": [
["env", {"modules": false}],
"react",
"stage-0"
],
"plugins": [
"transform-decorators-legacy"
],
"env": {
"development": {
"plugins": [
"react-hot-loader/babel"
]
},
"test": {
"presets": ["es2015", "react", "stage-0"],
"plugins": [
"transform-decorators-legacy"
]
}
}
}
/*
Presets/Plugins order matters
[Ref](https://babeljs.io/docs/plugins/#plugin-preset-ordering)
In short:
1. plugins run before presets
2. plugins run in top-down order
3. presets run in bottom-up order
*/
/* As of 2017-02-23, most plugins at semver "^6.22.0"
* Below are plugins that're included in aforementioned presets, in the order they're supposed to apply
# presets stage-0 to stage-3:
## stage-0
transform-do-expressions
transform-function-bind
## stage-1
transform-class-constructor-call
transform-export-extensions
## stage-2
transform-class-properties
transform-decorators
syntax-dynamic-import
## stage-3
syntax-trailing-function-commas
transform-async-generator-functions
transform-async-to-generator
transform-exponentiation-operator
transform-object-rest-spread
# preset react:
preset-flow
syntax-jsx
transform-react-jsx
transform-react-display-name
* preset es2015, es2016, es2017:
## es2015
check-es2015-constants
transform-es2015-arrow-functions
transform-es2015-block-scoped-functions
transform-es2015-block-scoping
transform-es2015-classes
transform-es2015-computed-properties
transform-es2015-destructuring
transform-es2015-duplicate-keys
transform-es2015-for-of
transform-es2015-function-name
transform-es2015-literals
transform-es2015-modules-amd
transform-es2015-modules-commonjs
transform-es2015-modules-systemjs
transform-es2015-modules-umd
transform-es2015-object-super
transform-es2015-parameters
transform-es2015-shorthand-properties
transform-es2015-spread
transform-es2015-sticky-regex
transform-es2015-template-literals
transform-es2015-typeof-symbol
transform-es2015-unicode-regex
transform-regenerator
## es2016
transform-exponentiation-operator
## es2017
syntax-trailing-function-commas
transform-async-to-generator
*/