Skip to content

关于 Generator 函数的疑问 #2

@chenjiahan

Description

@chenjiahan

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

image

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

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

image

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions