我有一个Rails 5应用,在IE 11中进行测试时,我注意到了我的JavaScript函数:
setTags (state, tags) {
state.tags = tags
}
返回一个错误,指出:Expected ":"
。我不熟悉如何配置babel,但这是我的.babelrc:
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}]
],
"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
["transform-class-properties", { "spec": true }]
]
}
我需要其他插件或IE特定规则吗?