-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Mangle properties prefix feature proposal #1001
Comments
up! Hello, project maintainers! Any thoughts about the issue? If any, i would be glad to contribute |
Seems #1038 would solve this usecase? |
Closed in #1038 -- thanks @jridgewell |
Hi guys, I'm trying to set a prefix to all of the variables and properties of a project but couldn't understand how to solve it with the post mentioned, do you have an example of what the config should be like? |
Both The default generator is here. Lines 1015 to 1061 in d32e177
|
Thanks @fabiosantoscode, I will check them. |
Bug report or Feature request?
Feature request
Version (complete output of
terser -V
or specific git commit)using terser via terser-webpack-plugin v5.0.3
Complete CLI command or
minify()
options usedProblem description
We use
TerserPlugin
with webpack, bundling several async chunks.Terser
is configured to minify private properties of class methods by regexp, also parallel minifying disabled and nameCache provided to avoid unwanted method and property names overriding in inherited classes, when parent and child classes are located in different async chunks. But it still remains issue, that private property mangling can override parent's public/protected method or property. Issue could be solved by usingreserved
option, but having complex project we can not provide such a full reserved list.Proposed solution
We'd like to have an option to mangle properties by some defined prefix, whitch is never used in props and methods, that are not meant to be mangled.
Propose config example:
Terser input:
Desired terser mangling properties output:
The text was updated successfully, but these errors were encountered: