Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid minify in react-native in release mode

I'm Generating the release APK for Android and want to test it without minifying the code.

How can I generate a release version for Android or iOS without minify the code?

Thanks.

like image 428
gusgard Avatar asked Feb 22 '17 19:02

gusgard


2 Answers

If you are using the default react-native cli you just need to use --minify false.

e.g.

node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js --platform ios  --minify false --dev false --reset-cache --bundle-output './ios/MobileTravelAdvisor/main.jsbundle' --assets-dest './ios' 
like image 53
RiastRush Avatar answered Nov 08 '22 21:11

RiastRush


Haul to the rescue,

Finally I found a solution, it seems that using Haul to generate the bundle is possible with the flag --minify false, use it with the command haul bundle

like image 1
gusgard Avatar answered Nov 08 '22 22:11

gusgard