Add Stage 2 Babel preset

Needed for rest spread operator (e.g. let {foo, ...bar} = baz)
This commit is contained in:
Alex Liebowitz 2017-01-09 03:54:52 -05:00
parent 78cb69a5ef
commit 18192cd93b
2 changed files with 8 additions and 7 deletions

View file

@ -34,9 +34,10 @@
"babel-core": "^6.18.2",
"babel-loader": "^6.2.8",
"babel-plugin-react-require": "^3.0.0",
"babel-polyfill": "^6.20.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-polyfill": "^6.20.0",
"babel-preset-stage-2": "^6.18.0",
"eslint": "^3.10.2",
"eslint-config-airbnb": "^13.0.0",
"eslint-loader": "^1.6.1",

View file

@ -25,12 +25,12 @@ module.exports = {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{
test: /\.jsx?$/,
// Enable caching for improved performance during development
// It uses default OS directory by default. If you need
// something more custom, pass a path to it.
// I.e., babel?cacheDirectory=<path>
loader: 'babel?cacheDirectory'
test: /\.jsx?$/,
loader: 'babel',
query: {
cacheDirectory: true,
presets:[ 'es2015', 'react', 'stage-3' ]
}
}
]
}