javascript-obfuscator / webpack-obfuscator

javascript-obfuscator plugin for Webpack
https://github.com/javascript-obfuscator/javascript-obfuscator
BSD 2-Clause "Simplified" License
876 stars 82 forks source link

Obfuscate method names in objects/classes. #142

Closed jacobnum closed 2 years ago

jacobnum commented 2 years ago

I Want to obfucsate method names in object/classes which was export.

For example: If i have module with export default calculateSomething = (...)=> {...} And import this in another module. Then build via webpack without any modules. using notepad find string "calculateSomething" it will not be founded. So its ok;

If i have some object in module like export const lib = { calculateSomething(...) {...} }

And then i importing this... After build i got many then 1 "calculateSomething" in result code but "lib" renamed correctly for example "rc": rc.calculateSomething(...)

Is in there library possible to do that? I know that i can rename all members in object but i dont need now to customize DTO exclude. Simplify only method members of class\objects it will be great enough :)

jacobnum commented 2 years ago

This question seems to be here [/javascript-obfuscator/javascript-obfuscator/issues/1083]