Skip to content

Commit

Permalink
fix: display file name for warnings/errors in overlay (#3867)
Browse files Browse the repository at this point in the history
  • Loading branch information
githoniel authored Sep 24, 2021
1 parent 3bc48a0 commit d20def5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client-src/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ function show(messages, type) {
messages.forEach((message) => {
const entryElement = document.createElement("div");
const typeElement = document.createElement("span");

typeElement.innerText = type === "warnings" ? "Warning:" : "Error:";
// ts-loader will output `error.file` for error file path, not in message
typeElement.innerText =
(type === "warnings" ? "Warning:" : "Error:") + (message.file || "");
typeElement.style.color = `#${colors.red}`;

// Make it look similar to our terminal.
Expand Down

0 comments on commit d20def5

Please sign in to comment.