Skip to content

Commit

Permalink
feat(es7): Enable es7.objectRestSpread
Browse files Browse the repository at this point in the history
This will enable us writing this like:

```js
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
```

or

```js
var defaults = { first: 'John', last: 'Doe', age: 42 };
var trainer  = { last: 'Smith', age: 35 };
trainer      = { ...defaults, ...trainer, age: 36 }
// => { first: 'John', last: 'Smith', age: 36 }
```

More info: https://github.com/sebmarkbage/ecmascript-rest-spread

Babeljs should have this enabled by default, but it seems than for it
to work when using the babel plugin for webpack, we need to explicitly
enable it.
  • Loading branch information
pixelastic committed Oct 16, 2015
1 parent a21bd7b commit fc2fbc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"plugins": ["babel-plugin-rewire"]
"plugins": ["babel-plugin-rewire"],
"stage": 2
}

0 comments on commit fc2fbc4

Please sign in to comment.