Skip to content

Commit 4f69f57

Browse files
committed
More useful Error in import onerror
See getsentry/sentry-javascript#2546 (comment)
1 parent 979742c commit 4f69f57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bundler/mod.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export const bundlerRuntimeCode = `
3737
e.onload = function() {
3838
y(a[s]);
3939
};
40-
e.onerror = n;
40+
e.onerror = function(g) {
41+
n(new Error('script failed to load ' + g.target.src));
42+
};
4143
p += f;
4244
if (r) {
4345
p += '?t=' + (new Date).getTime();

0 commit comments

Comments
 (0)