javascript-obfuscator / javascript-obfuscator/react-native-obfuscating-transformer

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

Open
#23 5 comments 14 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
211
Forks
102
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the transformer.js example in the issue and review how metro-babel-transformer and react-native-svg-transformer are invoked. Determine what documented configuration is needed to combine these transformers with obfuscation, then verify the resulting usage against the repository's existing documentation or examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
build-system, mobile-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.