全栈项目搭建 ------- babel

async await

await只能在async函数中,后面接promise。是真的同步。

async返回一个promise。

 

regeneratorRuntime is not defined

npm i babel-plugin-transform-runtime -D
.babelrc
"plugins": [ "transform-runtime" ]
posted @ 2020-08-23 20:48  web-小强  阅读(143)  评论(0)    收藏  举报