regeneratorRuntime is not defined报错处理

提示这个报错是因为使用了async/await等es7语法,需要babel进行转换

具体:(babel7)

$ yarn add @babel/runtime && yarn add --dev @babel/plugin-transform-runtime

并在.babelrc里面添加如下:

{
    ...,
    plugins: ['@babel/plugin-transform-runtime']
}
posted @ 2019-07-15 00:24  musiq66  阅读(10087)  评论(0编辑  收藏  举报