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

How to use react-native-obfuscating-transformer with multiple transformers/resolvers #23

Open
ghost opened this issue Jan 13, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 13, 2020

I'm trying to add multiple resolvers and transformers using metro for my react native project, how do I combine them and obfuscate the code.

I am using metro-babel-transformer and react-native-svg-transformer

var upstreamTransformer = require("metro-babel-transformer");
var svgTransformer = require("react-native-svg-transformer");

module.exports.transform = function({ src, filename, options }) {
if (filename.endsWith(".svg")) {
    return svgTransformer.transform({ src, filename, options });
  }  else {
    return upstreamTransformer.transform({ src, filename, options });
  }
};

My transformer.js look like this

@juanjsebgarcia
Copy link

Check out this comment by @AustinZuniga
#2 (comment)

@geraintwhite
Copy link

Did anyone make this work with react-native-svg-transformer?

@benduongquangmobile
Copy link

Same issue

@xhirazi
Copy link

xhirazi commented Mar 7, 2022

@grit96 @benduongquangmobile

follow this to resolve

@Ttecs
Copy link

Ttecs commented Jun 21, 2022

I had the same problem.instead of using react-native-obfuscating-transformer I used obfuscator-io-metro-plugin

https://stackoverflow.com/questions/72695239/configure-react-native-obfuscating-transformer-and-react-native-svg-transformer/72698465#72698465

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

5 participants