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

Minify private methods and private properties of JS classes #652

Open
AnatoliyDanchuk opened this issue Dec 18, 2023 · 3 comments
Open

Minify private methods and private properties of JS classes #652

AnatoliyDanchuk opened this issue Dec 18, 2023 · 3 comments

Comments

@AnatoliyDanchuk
Copy link

Actual: Private methods and private properties of JS classes are not minified.
Expected: Private methods and private properties of JS classes are minified.

Example:

class AnyClassName {
        #anyPrivateProperty = 1;
        #anyPrivateMethod() {}
}

@AnatoliyDanchuk
Copy link
Author

I have checked your link.
And your link confirms names of private properties/methods are not minimized.
I expect that names will be minimized to single char, because private properties and methods have only local scope like const|let, thus minimizer may safety minimize their names.
I used versions: v2.20.10, v2.20.9.

@tdewolff
Copy link
Owner

Ah now I understand, you mean that the names themselves are not minified, even though the syntax of private properties and methods are minified. I will look into this, great idea!

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