How to use react-native-obfuscating-transformer with multiple transformers/resolvers
See original GitHub issueI’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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:5
Top Results From Across the Web
Configure react-native-obfuscating-transformer and react ...
I want to use react-native-svg-transformer and react-native-obfuscating-transformer.but when configuring it using the merge config method ...
Read more >@inoueyuworks/react-native-obfuscating-transformer - npm
Defines what the first pass of code transformation is. If you don't use a custom transformer already, you don't need to set this...
Read more >Configure multiple transformers/resolvers using metro-React ...
Coding example for the question Configure multiple transformers/resolvers using metro-React Native.
Read more >Parcel.js
import {Transformer} from '@parcel/plugin'; export default new Transformer({ async transform({asset}) { let source = await asset.getCode(); let sourceMap = ...
Read more >inoueyuworks/react-native-obfuscating-transformer - Snyk
Obfuscating transformer for react-native For more information about how to use this package see README · Ensure you're using the healthiest npm packages...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem.instead of using react-native-obfuscating-transformer I used obfuscator-io-metro-plugin
@grit96 @benduongquangmobile
follow this to resolve