-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to bundle server to generate full sourcemaps from babel
Reviewed By: bestander Differential Revision: D3863894 fbshipit-source-id: a282758e022d403743841bc59277196e6741ed18
- Loading branch information
Showing
4 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this means? Before it was not the full sourcemaps?
e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This forces using babel sourcemaps that have full column information for mapped files. This is needed for things the resolving error and CPU profile stacks (but not debugging, which is only line based). Without this flag, sourcemaps are generated by _getMappings or generateSourceMapForVirtualModule in Bundle.js, which work, but don't have sub-line granularity.
It's a flag and not on all the time because it makes the sourcemaps way bigger, so it's slower to build the bundle, and can cause chrome dev tools to crash (out of memory!) when debugging.
e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cwdick could you define sub-line granularity? we're trying to figure out if this is why we never got exact mapping position in crashlytics, and now I'm seeing the same fuzziness in Sentry (all in production builds). So I'm wondering if after this patch we'll be good to go.
e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jondot Did you achieve to get Sentry working with React Native ? I uploaded the bundle and the sourcemaps and I always get error like
Source code was not found for /Users/[path]/node_modules/react/lib/ReactNativeBaseComponent.js
and so on for all the components in the stacktrace.e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kerumen yes, I did. This is what I do (may be different from your workflow):
react-native bundle
with production flags (dev=false), and per platform (ios/android), and include sourcemapsmain.jsbundle
you must name the release asset/main.jsbundle
.e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kerumen sure
e6bec9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jondot, I don't think this would do anything for that, you're still just looking at line numbers. The extra info in the sourcemaps is for mapping columns too.