File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ ErrorOverlay.startReportingRuntimeErrors({
3333 module . hot . decline ( ) ;
3434 }
3535 } ,
36+ filename : 'static/js/bundle.js' ,
3637} ) ;
3738
3839if ( 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';
2121type RuntimeReportingOptions = { |
2222 onError : ( ) => void ,
2323 launchEditorEndpoint : string ,
24+ filename ?: string ,
2425| } ;
2526
2627let iframe : null | HTMLIFrameElement = null ;
@@ -55,7 +56,7 @@ export function startReportingRuntimeErrors(options: RuntimeReportingOptions) {
5556 } finally {
5657 handleRuntimeError ( errorRecord ) ;
5758 }
58- } ) ;
59+ } , options . filename ) ;
5960}
6061
6162function handleRuntimeError ( errorRecord ) {
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ export type ErrorRecord = {|
3939 stackFrames : StackFrame [ ] ,
4040| } ;
4141
42- export function listenToRuntimeErrors ( crash : ErrorRecord => void ) {
42+ export function listenToRuntimeErrors (
43+ crash : ErrorRecord => void ,
44+ filename : string = '/static/js/bundle.js'
45+ ) {
4346 function crashWithFrames ( error : Error , unhandledRejection = false ) {
4447 getStackFrames ( error , unhandledRejection , CONTEXT_SIZE )
4548 . then ( stackFrames => {
@@ -68,7 +71,7 @@ export function listenToRuntimeErrors(crash: ErrorRecord => void) {
6871 {
6972 message : data . message ,
7073 stack : data . stack ,
71- __unmap_source : '/static/js/bundle.js' ,
74+ __unmap_source : filename ,
7275 } ,
7376 false
7477 ) ;
You can’t perform that action at this time.
0 commit comments