Skip to content

Commit 4045b47

Browse files
committed
Make diagnostics use node's source file instead of transformed one
1 parent e072bb0 commit 4045b47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Transpile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function transpile({
117117
diagnostics.push({
118118
category: ts.DiagnosticCategory.Error,
119119
code: 0,
120-
file: sourceFile,
120+
file: err.node.getSourceFile(),
121121
start: err.node.getStart(),
122122
length: err.node.getWidth(),
123123
messageText: err.message,

0 commit comments

Comments
 (0)