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']
}
原文地址:https://www.cnblogs.com/musiq66/p/11186598.html