Babel
Babel 5 to Babel 6
.babelrc
Babel 5
{
"stage": 0,
"env": {
"development": {
"plugins": [
"react-transform"
],
"extra": {
"react-transform": {
"transforms": [{
"transform": "react-transform-hmr",
"imports": ["react"],
"locals": ["module"]
}]
}
}
"presets": ["es2015", "stage-0", "react"]
}
}
}
Babel 6
stage
is deprecatedextra
is deprecated
{
"presets": ["react", "es2015", "stage-0"],
"env": {
"development": {
"plugins": [
["react-transform", {
"transforms": [{
"transform": "react-transform-hmr",
"imports": ["react"],
"locals": ["module"]
}]
}]
],
}
}
}
Refs: