Skip to content

Commit ae499ed

Browse files
committed
Handle null file in error
1 parent a593d1e commit ae499ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ const vuePlugin = (opts: Options = {}) => <esbuild.Plugin>{
297297
location: {
298298
column: o.column,
299299
line: o.file === args.path ? style.loc.start.line + o.line - 1 : o.line,
300-
file: o.file.replace(/\?.*?$/, ""),
300+
file: o.file?.replace(/\?.*?$/, "") ?? "<unknown>",
301301
namespace: "file"
302302
}
303303
}))

0 commit comments

Comments
 (0)