Skip to content

Commit d20def5

Browse files
authored
fix: display file name for warnings/errors in overlay (#3867)
1 parent 3bc48a0 commit d20def5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client-src/overlay.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ function show(messages, type) {
130130
messages.forEach((message) => {
131131
const entryElement = document.createElement("div");
132132
const typeElement = document.createElement("span");
133-
134-
typeElement.innerText = type === "warnings" ? "Warning:" : "Error:";
133+
// ts-loader will output `error.file` for error file path, not in message
134+
typeElement.innerText =
135+
(type === "warnings" ? "Warning:" : "Error:") + (message.file || "");
135136
typeElement.style.color = `#${colors.red}`;
136137

137138
// Make it look similar to our terminal.

0 commit comments

Comments
 (0)