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

Add an option in uglifyjs to enable excluding use of some variables when uglifying code #3105

Open
anubmat opened this issue Apr 26, 2018 · 1 comment

Comments

@anubmat
Copy link

anubmat commented Apr 26, 2018

Feature request

Is it possible to have an option that allows us to specify characters that we want the minifier to exclude from being used during minification. Something like excludeChars: ['$']
In my case, with minification, a function call is sometimes reduced to $(o), which is a macro for output path, and is thus misread by the interpreter.

Just to be clear, this is different from using the 'reserved' option, as I don't want '$' keyword from not being mangled, but I want the uglifier to not use $ when replacing variables/function_names

@vivekpan27
Copy link

The mangler option should help you with that https://github.com/mishoo/UglifyJS#cli-mangle-options

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

2 participants