From 92b7e7a0ef6ebabc01942b809132f4fc2c2fa47a Mon Sep 17 00:00:00 2001 From: Marco Fernandes Date: Thu, 14 Mar 2019 17:27:34 +0000 Subject: [PATCH] Add Babel's object rest and spread plugin to "compile" to ES5. --- package.json | 1 + webpack.config.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/package.json b/package.json index f4c61cf..b26b06c 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "devDependencies": { "@babel/core": "^7.2.2", "@babel/preset-react": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.3.4", "@wordpress/eslint-plugin": "^1.0.1", "babel-eslint": "^10.0.1", "babel-loader": "^8.0.5", diff --git a/webpack.config.js b/webpack.config.js index 6d17c2c..e44380c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -32,6 +32,9 @@ const babelLoader = { loader: 'babel-loader', options: { presets: ['@babel/preset-react'], + plugins: [ + '@babel/plugin-proposal-object-rest-spread', + ], }, };