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

Nobody has claimed this yet.

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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.