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

Files not being obfuscated #32

Open
rohitmodi12 opened this issue May 18, 2020 · 3 comments
Open

Files not being obfuscated #32

rohitmodi12 opened this issue May 18, 2020 · 3 comments

Comments

@rohitmodi12
Copy link

Previously I am facing this issue:
"TypeError: Cannot read property 'transformFile' of undefined"

But It is resolved by this code.
getTransformModulePath: () => {
return require.resolve('./transformer');
}

But after creating build, code is not being obfuscated.
And I want to obfuscate single file instead of "src" folder.

Please help.
Thanks.

@bobbyecho
Copy link

bobbyecho commented May 22, 2020

Hi @rohitmodi12, how you can solve TypeError: Cannot read property 'transformFile' of undefinedissue? i'm facing this problem right now

i'm using react-native 0.59.8

thanks

@rohitmodi12
Copy link
Author

Hi @rohitmodi12, how you can solve TypeError: Cannot read property 'transformFile' of undefinedissue? i'm facing this problem right now

i'm using react-native 0.59.8

thanks

Hello,
You can use
getTransformModulePath: () => {
return require.resolve('./transformer');
}

instead of

babelTransformerPath: require.resolve("./transformer")

Through this you can resolve this issue but I am not able to generate obfuscated code. If you are able then let me know.

@fukit0
Copy link

fukit0 commented Sep 4, 2020

replacing

getTransformModulePath: () => { return require.resolve('./transformer'); }

with
babelTransformerPath: require.resolve("./transformer")

fix the issue below:
Error: Cannot find module 'metro/src/reactNativeTransformer'

this may help someone else's problem.

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

3 participants