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

Accept regex in mangle keep options #125

Merged

Conversation

koddsson
Copy link
Contributor

Hey there 👋

I want to only keep certain function and class names in my bundles so that our error reporting software will report errors correctly when calling Function.prototype.name. Setting keep_fnames: true adds too much unwanted data.

This PR allows users to pass a regular expression to keep_fnames and keep_classnames and will only mangle class names and functions that don't match that regular expression.

Maybe there are too much redundancy in the tests since I figure the keep_fnames and keep_classnames are already being testing somewhere else. Let me know I'll delete those tests and only keep the keep_some_* tests.

@fabiosantoscode
Copy link
Collaborator

Nice work, thank you very much!

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

Successfully merging this pull request may close these issues.

2 participants