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

Let keep_fnames mangle implicit function names (variable names of arrow functions) #1475

Open
skerit opened this issue Nov 22, 2023 · 1 comment
Labels
compress Issue in the compression step enhancement mangle Issue in the mangler

Comments

@skerit
Copy link

skerit commented Nov 22, 2023

With keep_fnames enabled, Terser refuses to mangle the variable of the following code:

const my_long_variable_name = () => {};

I can see the reasoning behind this, but I only want to keep explicit function names, not implicit ones like this.

@fabiosantoscode
Copy link
Collaborator

This is a pretty reasonable request. Long names will increase file size. I think keep_fnames="explicit" would be a good option.

@fabiosantoscode fabiosantoscode added enhancement compress Issue in the compression step mangle Issue in the mangler labels Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compress Issue in the compression step enhancement mangle Issue in the mangler
Projects
None yet
Development

No branches or pull requests

2 participants