From fc2fbc4599570703c12b30b287a8b91e6b05d701 Mon Sep 17 00:00:00 2001 From: Pixelastic Date: Fri, 16 Oct 2015 11:53:55 +0200 Subject: [PATCH] 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. --- .babelrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.babelrc b/.babelrc index 64dbcd3470..ff17ce2b3b 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "plugins": ["babel-plugin-rewire"] + "plugins": ["babel-plugin-rewire"], + "stage": 2 }