npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android-release.bundle

Category: React Native & Mobile

npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android-release.bundle

Bundle JavaScript for release without Metro

Pre-compiles all JS into a single bundle file, so the release build does not need the dev server. Run this before a standalone APK when you want the JS baked in. --dev false enables production optimizations.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.