报错信息:
unexpected token
回答
小泽回答
原因是浏览器无法识别ES6的扩展运算符
需要使用babel插件进行编译
npm install --save-dev babel-plugin-transform-object-rest-spread
下载完插件后在.babelrc
添加插件
{ "plugins": ["transform-object-rest-spread"] }

(0)