Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 Generator 函数的疑问 #2

Open
chenjiahan opened this issue Oct 8, 2021 · 1 comment
Open

关于 Generator 函数的疑问 #2

chenjiahan opened this issue Oct 8, 2021 · 1 comment

Comments

@chenjiahan
Copy link

按照本仓库中的数据,从基础库 2.11 开始就可以使用 Generator 函数。

image

在我们的项目中,我们使用 @babel/preset-env@babel/plugin-transform-runtime 进行编译,将 target 设置为 iOS >= 10,同时关闭了开发者工具自带的 ES6 转 ES5增强编译,理论上是可以使用 Generator 的。

但我们在 iOS 10 真机验证过程中发现,Generator 会产生以下异常:

image

在开放社区中也有类似的反馈:

请问以上异常是否与小程序的 JS 执行环境有关呢?

@Tidyzq
Copy link
Contributor

Tidyzq commented Dec 3, 2021

基础库 2.17.1 之前的 generator 函数存在问题,建议尽量避免使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants