Skip to content

Commit

Permalink
More useful Error in import onerror
Browse files Browse the repository at this point in the history
  • Loading branch information
TjeuKayim committed Sep 21, 2021
1 parent 979742c commit 4f69f57
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 4f69f57

Please sign in to comment.