引入插件
npm install --save-dev babel-plugin-transform-object-rest-spread
下载完插件后在.babelrc添加插件
{ "plugins": ["transform-object-rest-spread"] }
插件地址:https://babeljs.io/docs/plugins/transform-object-rest-spread