首頁  >  問答  >  主體

babel 转码 async await 无法解析问题

使用 babel 转码 async await 无法解析问题报错:You gave us a visitor for the node type "ForAwaitStatement" but it's not a valid type

.babelrc 配置文件

{
    "plugins": [        "transform-strict-mode",        "transform-es2015-modules-commonjs",        "transform-es2015-spread",        "transform-es2015-destructuring",        "transform-es2015-parameters"
    ],
    "presets": [        "es2015",        "stage-0"
    ]}


巴扎黑巴扎黑2901 天前1685

全部回覆(1)我來回復

  • 面对疾风吧

    面对疾风吧2016-11-09 17:32:00

    presets-stage-3 才支持,或者直接用 preset-latest

    回覆
    0
  • 取消回覆