wechat-miniprogram / miniprogram-cli

MIT License
69 stars 38 forks source link

使用 async/await 语法报错 #5

Closed yzqzy closed 2 years ago

yzqzy commented 2 years ago

use custom_component template

Error:ReferenceError: regeneratorRuntime is not defined

JuneAndGreen commented 2 years ago

是执行 cli 命令失败么?具体是跑什么命令时失败的?

我执行 miniprogram init -t custom-component -n test-cli-custom-component 看起来正常。

如果是模板里面没有支持 async/await 的话,按需求手动补一下 babel 配置就行。不过模板现在更推荐用这个,支持能力更加完善:https://github.com/wechat-miniprogram/mpflow

yzqzy commented 2 years ago

模板中没有支持 async/await 语法,自己尝试添加 babel 配置失败。

JuneAndGreen commented 2 years ago

模板问题直接自己按需补充对应的 preset 或者 plugin 即可。