-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teach react native to consume source maps #116
Comments
Thanks @caridy! Will get rid of the weirdness soon :) |
@frantic Can the JS read it's own source? So we can parse out source maps from the comments as opposed to exposing the global variables? |
@amasad from the spec, no, you don't have access to the source from the runtime. this process has to happen in the native layer. There are many npm packages to deal with source map, like https://github.com/lydell/source-map-url, hope that help to get the idea of how to pick up the source map from the blob after reading it from disk. Of course, we will have to implement it in native :) |
On my radar, will take a closer look soon |
As of #148 RN will fallback to |
awesome, thanks @frantic |
Update video.md with HTML5DevConf 2014 talk
As today, the Packager not only produce the source maps, it also defines
RAW_SOURCE_MAP
variable, which is a representation of the source maps for the runtime so the errors can be mapped correctly.Ideally, react native should be able to extract the source map information from the bundle file before executing it in JSC just like browsers do this, including the possibility of using an external source map.
This will open the door for the use of other tools that can take care of the bundling process without having to implement the logic for
RAW_SOURCE_MAP
, which is proprietary and very weird ;)/cc @amasad, @ericf, this is what we were trying to explain in the meeting last week.
The text was updated successfully, but these errors were encountered: