Skip to content

Commit

Permalink
Merge pull request #8615 from felixfbecker/patch-1
Browse files Browse the repository at this point in the history
Add name property to error thrown on chunk load failure
  • Loading branch information
sokra committed Jun 12, 2019
2 parents 44fff70 + 74178d4 commit acf2c2d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 59 deletions.
1 change: 1 addition & 0 deletions lib/web/JsonpMainTemplatePlugin.js
Expand Up @@ -188,6 +188,7 @@ class JsonpMainTemplatePlugin {
"var errorType = event && (event.type === 'load' ? 'missing' : event.type);",
"var realSrc = event && event.target && event.target.src;",
"error.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';",
"error.name = 'ChunkLoadError';",
"error.type = errorType;",
"error.request = realSrc;",
"chunk[1](error);"
Expand Down

0 comments on commit acf2c2d

Please sign in to comment.