react-native/local-cli/bundle
Martín Bigio f99468de65 Sourcemaps support for RAM
Summary:This rev adds support for production sourcemaps on RAM.

When we inject a module into JSC we use the original `sourceURL` and specify the `startingLineNumber` of the module relative to a "regular" bundle. By doing so, when an error is thrown, JSC will include the provided `sourceURL` as the filename and will use the indicated `startingLineNumber` to figure out on which line the error actually occurred.

To make things a bit simpler and avoid having to deal with columns, we tweak the generated bundle so that each module starts on a new line. Since we cannot assure that each module's code will be on a single line as the minifier might break it on multiple (UglifyJS does so due to a bug on old versions of Chrome), we include on the index the line number that should be used when invoking `JSEvaluateScript`. Since the module length was not being used we replaced the placeholder we have there for the line number.

Reviewed By: javache

Differential Revision: D2997520

fb-gh-sync-id: 3243a489cbb5b48a963f4ccdd98ba63b30f53f3f
shipit-source-id: 3243a489cbb5b48a963f4ccdd98ba63b30f53f3f
2016-03-13 11:14:32 -07:00
..
__mocks__ Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
__tests__ Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
output Sourcemaps support for RAM 2016-03-13 11:14:32 -07:00
assetPathUtils.js Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
buildBundle.js Avoid hardcoding platform on blacklist 2016-03-12 10:59:26 -08:00
bundle.js Add unbundling to packager 2015-12-01 08:48:30 -08:00
bundleCommandLineArgs.js Add infra for Prepack build option 2015-11-20 20:19:25 -08:00
getAssetDestPathAndroid.js Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
getAssetDestPathIOS.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
saveAssets.js bugfix #3997: react-native bundle not working on windows 10 2015-11-27 08:22:29 -08:00
sign.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
signedsource.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
unbundle.js Add unbundling to packager 2015-12-01 08:48:30 -08:00