/
.babelrc
61 lines (60 loc) · 1.37 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
{
"presets": [
// JSX, Flow
"react",
"es2015",
"es2016",
"es2017"
],
"plugins": [
"add-module-exports",
"react-hot-loader/babel",
// class { handleClick = () => { } }
"transform-class-properties",
// @decorate classes, helpful with redux
"transform-decorators-legacy",
"transform-export-extensions",
// { ...todo, completed: true }
"transform-object-rest-spread",
["transform-runtime", {
"helpers": false,
"polyfill": false,
"regenerator": true
}],
"syntax-jsx",
"transform-react-jsx",
"lodash"
],
"env": {
"test": {
"plugins": [
"transform-react-display-name",
// Adds __self attribute to JSX which React will use for some warnings
"transform-react-jsx-self",
// Adds component stack to warning messages
"transform-react-jsx-source"
]
},
"development": {
"plugins": [
"transform-react-display-name",
// Adds __self attribute to JSX which React will use for some warnings
"transform-react-jsx-self",
// Adds component stack to warning messages
"transform-react-jsx-source"
]
},
"production": {
},
"node": {
"plugins": [
[
"babel-plugin-transform-require-ignore",
{
"extensions": [".less", ".scss"]
}
]
]
}
}
}