Unverified Commit 5ab289ca authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Turbopack: improve error display (#58734)

### What?

* include path and title in errors
* don't block the page for errors in node_modules

### Why?

### How?

---------
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 642ad12c
......@@ -305,10 +305,12 @@ async function startWatcher(opts: SetupOpts) {
const { start } = source.range
message = `${issue.severity} - ${formattedFilePath}:${
start.line + 1
}:${start.column}`
}:${start.column} ${formattedTitle}`
} else {
message = `${issue.severity} - ${formattedFilePath} ${formattedTitle}`
}
} else if (formattedFilePath) {
message = `${formattedFilePath} ${formattedTitle}`
} else {
message = `${formattedTitle}`
}
......@@ -368,6 +370,9 @@ async function startWatcher(opts: SetupOpts) {
console.error(` ⚠ ${displayName} ${formatted}\n\n`)
}
newSet.set(key, issue)
// We show errors in node_modules to the console, but don't throw for them
if (/(^|\/)node_modules(\/|$)/.test(issue.filePath)) continue
relevantIssues.add(formatted)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment