Search code examples
react-nativeminifyuglifyjs

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.


Solution

  • 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'