You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change of plan, the tool just works for Dev mode only (since we can't do adb shell run-as in Prod mode)
Add a flag --generate-source-map, in which case
If metro server is running, get bundle and source maps from running metro server, and store in os.tmpDir()
If metro server is not running, run the command react-native bundleand store the bundle and source map in os.tmpDir()
If there's no flag, proceed in 2 steps:
Find the source map from local development machine,
If the CLI is generating a bundle in debug mode, the bundle will exist
Directory android/app/build/generated/sourcemaps/react/debug/index.android.bundle.map OR android/app/build/intermediates/sourcemaps/react/debug/index.android.bundle.packager.map
Request the bundle from running server
Make a request to the URL, http://${IP_ADDRESS}:${DEBUG_SERVER_PORT}/${MAP_FILE_NAME}?platform=${PLATFORM}&dev=true
Get the source map file and store it in the os.tmpDir()
If both steps above failed:
- Instruct them how to get source map: turn bundleInDebug: true on build.gradle
- Run without source maps
Suggestions from Ram:
APP_DIR/assets
, and check if this file is minified (better option).react-native bundle --minify={isProdMode}
: 1 of 2 waysrequire('react-native')
and then generate the source mapThe text was updated successfully, but these errors were encountered: