Skip to content

Commit

Permalink
More useful Error in import onerror (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
TjeuKayim committed Sep 23, 2021
1 parent bd32a27 commit 70f228b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bundler/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export const bundlerRuntimeCode = `
e.onload = function() {
y(a[s]);
};
e.onerror = n;
e.onerror = function(g) {
n(new Error('script failed to load ' + g.target.src));
};
p += f;
if (r) {
p += '?t=' + (new Date).getTime();
Expand Down

0 comments on commit 70f228b

Please sign in to comment.