-
Notifications
You must be signed in to change notification settings - Fork 100
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
Not working in react native .56 #5
Comments
@balapkm any update with this issue? |
I'm using 0.57.2 |
Same. No error, no log, nothing. On RN 0.57.5 |
I see that the files are being processed (trace: true) and I also printed the output of obfuscateCode and it does obfuscate the code. However:
|
@tobiarobi Hi tobiarobi, I also set the trace to true but got nothing obfuscated, and I use typescript as well, is it possible to share your transformer.js file? Thanks.
|
@wangghon That's because there is a bug in the default filter function.
|
@tobiarobi Thanks for the response. Your suggestion works. when I enable trace flag, see the output in console that all the files are obfuscating, however I found that the code is not obfuscated at all, did you experience the similar issue? |
@wangghon As I've explained in the first comment. It does work when you print the obfuscated code returned by the transformer (just add console.log for the obfuscated code and you'll see that it works). However somewhere afterwards in the flow (when its bundled together) perhaps its minified afterwards and some of the work that the obfuscator does is lost. I haven't had a chance to investigate this thoroughly, nevertheless I can say that the output is somewhat different than running without the transformer. (for example: for my project the output with the obfuscator was larger than without it) |
@tobiarobi Thanks. |
console.log the output of
|
I'm experiencing the same problem. react-native: 0.57.8 |
Same issue here. No obfuscation takes place at all. I changed filter options, and traced the output, which does not seem to be correct. |
I guess the author disable string encryption in src/obfuscatingTransformer.ts. I tried edit it: kida7@6102158#diff-579dbaeadaa3587b0767bdec80686f2f And build bundle with the following obfuscator options: But we will get errors because obfuscator encrypt all strings in "require" function. So I think, the solution for this is split all the code you want to encyript to specific modules an import/require them. Then you change the filter function to encrypt only those files. |
Cannot find module 'metro/src/transformer'
The text was updated successfully, but these errors were encountered: