Skip to content

The code cannot be efficiently minified #1

@lovasoa

Description

@lovasoa

The code dynamically fetches it's own methods in https://github.com/sanity-io/mendoza-js/blob/master/src/internal-patcher.ts#L68-L69 :

let processor = `process${op}`
this[processor].apply(this)

When this code goes through a performant javascript minifier, it will break.

For the code to be able to go through minification efficiently and without breaking, the OPS constant should be a list of functions instead of a list of strings.

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