-
Notifications
You must be signed in to change notification settings - Fork 5
/
.babelrc
35 lines (32 loc) · 1.04 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
/*
Order:
Plugins run before Presets.
Plugin ordering is first to last.
Preset ordering is reversed (last to first).
React preset => includes flow preset which includes transform-flow-strip-types(removes flow types)
We can use the env option to set specific options when in a certain environment. Options specific to a certain environment are merged into and overwrite non-env specific options. Presets do not merge if you define presets in an env.
Using modules:false means that es6 import will not be converted to Common.js. That means that if inside webpack.config we want to use import and export we need to remove modules:false from here and set it inside webpack.config
*/
{
"presets": [
"react",
["es2015", { "modules": false }],
"stage-0"
],
"plugins": [
"react-hot-loader/babel",
"transform-runtime"
],
"env": {
"test": {
"presets": [
"react",
"es2015",
"stage-0"
],
"plugins":[
[ "babel-plugin-webpack-alias", { "config": "./webpack.config.js" } ]
]
}
}
}