Arthur Krukowski
02/27/2025, 8:47 AMinitMetadataForClass(AuthTokenResponse, 'AuthTokenResponse');
I really don't understand how to say, for example, terser plugin to mangle/obfuscate those strings. After additional mangling code with terser I got this result, but the strings are still visible.
Oi(Yu,"AuthTokenResponse")
We’re worried that using the original names makes reverse engineering significantly easier.Edoardo Luppi
02/27/2025, 5:06 PMturansky
02/27/2025, 5:08 PMDefinePlugin
can be used for exampleArthur Krukowski
02/27/2025, 5:21 PMEdoardo Luppi
02/27/2025, 5:22 PMturansky
02/27/2025, 5:23 PMwhole-program
granularity?Arthur Krukowski
02/27/2025, 5:25 PMturansky
02/27/2025, 5:26 PMIt seems like it can be done with a compiler pluginI set special names via plugin for lazy loading
turansky
02/27/2025, 5:28 PMArthur Krukowski
02/27/2025, 5:39 PM@JsName("MyCustomClassName")
class AuthTokenProvider {...}
// It will change this:
initMetadataForClass(AuthTokenResponse, 'AuthTokenResponse');
// to this:
initMetadataForClass(MyCustomClassName, 'AuthTokenProvider');
Anyway, thank you for information. I'll try to analyze it to find the better solution for us.Edoardo Luppi
02/27/2025, 5:42 PMKClass::simpleName
So be careful in changing those values.broadway_lamb
02/28/2025, 11:14 AMinitMetadataForClass
calls for classes that don't participate in reflection (and we're planning to tackle this), for now the only solution I can suggest is post-processing the generated JS files.Olexandr Marchuk
02/28/2025, 11:46 AMbroadway_lamb
02/28/2025, 1:22 PM