Add Stage 2 Babel preset
Needed for rest spread operator (e.g. let {foo, ...bar} = baz)
This commit is contained in:
parent
78cb69a5ef
commit
18192cd93b
2 changed files with 8 additions and 7 deletions
|
@ -34,9 +34,10 @@
|
||||||
"babel-core": "^6.18.2",
|
"babel-core": "^6.18.2",
|
||||||
"babel-loader": "^6.2.8",
|
"babel-loader": "^6.2.8",
|
||||||
"babel-plugin-react-require": "^3.0.0",
|
"babel-plugin-react-require": "^3.0.0",
|
||||||
|
"babel-polyfill": "^6.20.0",
|
||||||
"babel-preset-es2015": "^6.18.0",
|
"babel-preset-es2015": "^6.18.0",
|
||||||
"babel-preset-react": "^6.16.0",
|
"babel-preset-react": "^6.16.0",
|
||||||
"babel-polyfill": "^6.20.0",
|
"babel-preset-stage-2": "^6.18.0",
|
||||||
"eslint": "^3.10.2",
|
"eslint": "^3.10.2",
|
||||||
"eslint-config-airbnb": "^13.0.0",
|
"eslint-config-airbnb": "^13.0.0",
|
||||||
"eslint-loader": "^1.6.1",
|
"eslint-loader": "^1.6.1",
|
||||||
|
|
|
@ -26,11 +26,11 @@ module.exports = {
|
||||||
{ test: /\.css$/, loader: "style!css" },
|
{ test: /\.css$/, loader: "style!css" },
|
||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
// Enable caching for improved performance during development
|
loader: 'babel',
|
||||||
// It uses default OS directory by default. If you need
|
query: {
|
||||||
// something more custom, pass a path to it.
|
cacheDirectory: true,
|
||||||
// I.e., babel?cacheDirectory=<path>
|
presets:[ 'es2015', 'react', 'stage-3' ]
|
||||||
loader: 'babel?cacheDirectory'
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue