I received error log like the following while the app crashed:
Fatal Exception: com.facebook.react.modules.core.JavascriptException: onSelect index.
Android inspired by @chetstone's answer
Starting on v0.32 for android, you can modify your android/app/build.gradle to accomplish this. Look for the line
apply from: "../../node_modules/react-native/react.gradle"
Just above this, you will see something like:
project.ext.react = [
entryFile: "index.js",
]
Modify it to match the following
project.ext.react = [
entryFile: "index.js",
extraPackagerArgs: ["--sourcemap-output", file("$buildDir/../../../sourcemap.android.js")]
]
On iOS
Go to your build phases in Xcode for the "Bundle React Native code and images" phase and add:
export EXTRA_PACKAGER_ARGS="--sourcemap-output sourcemap.ios.js"