这是indexloc提供的服务,不要输入任何密码
Skip to content

Minification breaks protocols #171

@LeXofLeviafan

Description

@LeXofLeviafan

Protocols rely on function names, which get shortened by code minifiers. Moreover, they (at least within one protocol definition) tend do be replaced by the same identifier, so in runtime an implementation of a minified protocol will only have one method (the one defined latest).

Possible fixes:

  • Change protocols implementation to not rely on method names
  • Set the name property externally with Object.defineProperty():
    Object.defineProperty(function() {}, 'name', {value: 'foo'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions