-
Notifications
You must be signed in to change notification settings - Fork 276
/
.babelrc
51 lines (51 loc) · 1.55 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
{
"presets": [
// 'latest',
// Experimental ECMAScript proposals
// https://github.com/babel/babel/tree/master/packages/babel-preset-stage-0
"react",
// Latest stable ECMAScript features
// https://github.com/babel/babel/tree/master/packages/babel-preset-latest
// webpack 2.0 can handle es6 modules natively
// and provides dead code removal
["env", {
"es2015": {
"modules": false
}
}],
// JSX, Flow
// https://github.com/babel/babel/tree/master/packages/babel-preset-react
"stage-0"
],
"plugins": [
"transform-runtime",
"transform-es2015-destructuring",
"transform-object-rest-spread",
"transform-es2015-parameters",
"transform-decorators-legacy",
"transform-class-properties",
"syntax-dynamic-import"
],
"env": {
"development": {
"plugins": [
// Adds component stack to warning messages
// https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-source
"transform-react-jsx-source",
// Adds __self attribute to JSX which React will use for some warnings
// https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-self
"transform-react-jsx-self"
]
},
"production": {
"presets": [
// Optimize React code for the production build
// https://github.com/thejameskyle/babel-react-optimize
"react-optimize"
]
},
"test": {
"plugins": ["transform-es2015-modules-commonjs", "dynamic-import-node"]
}
}
}