Skip to content

Commit

Permalink
fix: improve
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jan 10, 2024
1 parent 6530bbd commit d352d91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,9 @@ class MiniCssExtractPlugin {
Template.indent(["resolve();"]),
"} else {",
Template.indent([
"var errorType = event && (event.type === 'load' ? 'missing' : event.type);",
"var errorType = event && event.type;",
"var realHref = event && event.target && event.target.href || fullhref;",
'var err = new Error("Loading CSS chunk " + chunkId + " failed.\\n(" + realHref + ")");',
'var err = new Error("Loading CSS chunk " + chunkId + " failed.\\n(" + errorType + ": " + realHref + ")");',
'err.name = "ChunkLoadError";',
'err.code = "CSS_CHUNK_LOAD_FAILED";',
"err.type = errorType;",
Expand Down

0 comments on commit d352d91

Please sign in to comment.