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

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

Open
juj opened this issue Dec 13, 2021 · 0 comments

Comments

@juj
Copy link

juj commented Dec 13, 2021

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?

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

1 participant