I use grunt-babel to compile my ES6 code. But it returns Warning: dist/app.js: Unexpected token (321:9) Use --force to continue.
when I try to use {...obj}
to copy and extend object. Following code is working perfect in console of Chrome v61 but Babel doesn't like it. What is the problem?
let a = { a: 12 };
let b = { ...a, b: 15 };
I am using env preset. (babel-core v.6.26.0 and babel-preset-env v.1.6.1)