File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ ErrorOverlay.startReportingRuntimeErrors({
33
33
module . hot . decline ( ) ;
34
34
}
35
35
} ,
36
+ filename : 'static/js/bundle.js' ,
36
37
} ) ;
37
38
38
39
if ( module . hot && typeof module . hot . dispose === 'function' ) {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import type { ErrorRecord } from './listenToRuntimeErrors';
21
21
type RuntimeReportingOptions = { |
22
22
onError : ( ) => void ,
23
23
launchEditorEndpoint : string ,
24
+ filename ?: string ,
24
25
| } ;
25
26
26
27
let iframe : null | HTMLIFrameElement = null ;
@@ -55,7 +56,7 @@ export function startReportingRuntimeErrors(options: RuntimeReportingOptions) {
55
56
} finally {
56
57
handleRuntimeError ( errorRecord ) ;
57
58
}
58
- } ) ;
59
+ } , options . filename ) ;
59
60
}
60
61
61
62
function handleRuntimeError ( errorRecord ) {
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ export type ErrorRecord = {|
39
39
stackFrames : StackFrame [ ] ,
40
40
| } ;
41
41
42
- export function listenToRuntimeErrors ( crash : ErrorRecord => void ) {
42
+ export function listenToRuntimeErrors (
43
+ crash : ErrorRecord => void ,
44
+ filename : string = '/static/js/bundle.js'
45
+ ) {
43
46
function crashWithFrames ( error : Error , unhandledRejection = false ) {
44
47
getStackFrames ( error , unhandledRejection , CONTEXT_SIZE )
45
48
. then ( stackFrames => {
@@ -68,7 +71,7 @@ export function listenToRuntimeErrors(crash: ErrorRecord => void) {
68
71
{
69
72
message : data . message ,
70
73
stack : data . stack ,
71
- __unmap_source : '/static/js/bundle.js' ,
74
+ __unmap_source : filename ,
72
75
} ,
73
76
false
74
77
) ;
You can’t perform that action at this time.
0 commit comments