ES2017新增对象的扩展运算符特性,但自己编译错误,下面是主要文件。// main.jslet {a, ...x} = {a: 1, b: 2, c: 3}console.log(a, x)// webpack.config.js{ test: /\.js$/, exclude: /node_modules/, use: [{ loader: "babel-loader", options: { presets: ["es2015", "es2017"], plugins: [ "transform-runtime" ] } }]},SyntaxError: Unexpected tokenlet {a, ...x} = {a: 1, b: 2, c: 3} ^请教一下这样配置哪里有问题?谢谢
添加回答
举报
0/150
提交
取消