We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f5845a commit 709c291Copy full SHA for 709c291
packages/vite/src/node/build.ts
@@ -635,7 +635,12 @@ async function buildEnvironment(
635
const stackOnly = extractStack(e)
636
637
let msg = colors.red((e.plugin ? `[${e.plugin}] ` : '') + e.message)
638
- if (e.id) {
+ if (e.loc && e.loc.file && e.loc.file !== e.id) {
639
+ msg += `\nfile: ${colors.cyan(
640
+ `${e.loc.file}:${e.loc.line}:${e.loc.column}` +
641
+ (e.id ? ` (${e.id})` : ''),
642
+ )}`
643
+ } else if (e.id) {
644
msg += `\nfile: ${colors.cyan(
645
e.id + (e.loc ? `:${e.loc.line}:${e.loc.column}` : ''),
646
)}`
0 commit comments