According to the docs, the command to create release build in Android Studio is:
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/
As I understand, the release APK uses index.android.bundle file generated in /assets
folder to load the React View. Also I understand that --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle
generates it. But what --assets-dest android/com/your-company-name/app-package-name/src/main/res/
Is used for?
I am trying to create an app that dynamically receives index.android.bundle from a server and I wonder if the app should receive something else except of the bundle file to load the React View successfully.
CodePudding user response:
— bundle-output=
Is the path where main.bundlejs
will be created.
--assets-dest
Tells the bundler the destination to copy all the assets to (in this case just images).
CodePudding user response:
This option (--assets-dest
) tells the bundler the location of where you want to copy over all the assets of your project (ie. images/fonts etc..)