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

async await

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

async返回一个promise。

regeneratorRuntime is not defined

npm i babel-plugin-transform-runtime -D
.babelrc
"plugins": [ "transform-runtime" ]
原文地址:https://www.cnblogs.com/fengluzheweb/p/13550629.html