Skip to content

Do not minify any symbols that contain a substring (or match a regex?), or custom minification rules? #3900

Open

Description

@juj

Over at the Emscripten repository, we found a situation where we would like to instruct Closure not to minify any JS symbols that contain the substring __asyncjs__ in them.

Or if they are minified, they would like to be minified to a name that still retains the substring __asyncjs__ in them.

I was not able to find an existing option that would help here. The externs file allows one to specify full function names for symbols that should not be minified, but it does not lend to using a wildcard pattern or a regex pattern.

Maybe users could somehow specify these kinds of substrings or regex rules that would prevent minification.

Or maybe one method might be to allow user to register custom minification functions, that would still allow users to manually specify a minification, e.g. write a function that would do a transform __asyncjs__my_function_name -> __asyncjs__a?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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