Skip to content

Commit fc2fbc4

Browse files
committed
feat(es7): Enable es7.objectRestSpread
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.
1 parent a21bd7b commit fc2fbc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"plugins": ["babel-plugin-rewire"]
2+
"plugins": ["babel-plugin-rewire"],
3+
"stage": 2
34
}

0 commit comments

Comments
 (0)