Rails + Babel:函数调用在IE11中返回错误

时间:2018-09-19 18:47:28

标签: ruby-on-rails internet-explorer babeljs

我有一个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特定规则吗?

0 个答案:

没有答案