javascript-obfuscator / javascript-obfuscator/react-native-obfuscating-transformer
Just Don't Work
- Dominant language
- TypeScript
- Stars
- 211
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
The plugin just don't work...
**installed other dependencies needed:**
```
npm install babylon --save
npm install --save babel-traverse
```
**transformer.js**
```
const obfuscatingTransformer = require("react-native-obfuscating-transformer")
const filter = filename => {
return filename.startsWith("src");
};
module.exports = obfuscatingTransformer({
// this configuration is based on https://github.com/javascript-obfuscator/javascript-obfuscator
obfuscatorOptions:{
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
splitStrings: false,
stringArray: true,
stringArrayEncoding: false,
stringArrayThreshold: 0.75,
unicodeEscapeSequence: false
},
upstreamTransformer: require('metro-react-native-babel-transformer'),
emitObfuscatedFiles: false,
enableInDevelopment: true,
filter: filter,
trace: true
})
```
**metro.config.js**
```
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
babelTransformerPath: require.resolve("./transformer") // add here the transformer.js
},
};
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the example transformer.js and metro.config.js files, install the listed babylon and babel-traverse dependencies, and run the React Native build to capture the failure. Compare the transformer configuration with the project's documented entry points and determine the concrete error; done means the reported setup runs successfully with obfuscation enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, javascript, react-native
- Domain
- mobile, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100