Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 4627634

Browse files
fix: incorrect sourcemap of transformed code (#232)
1 parent 5999f37 commit 4627634

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/compiler/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ export function analyzeCode(code: string, filename: string, options: AnalyzeOpti
6161

6262
return {
6363
code: ms.toString(),
64-
map: ms.generateMap(),
64+
get map() {
65+
return ms.generateMap({
66+
source: filename,
67+
includeContent: true,
68+
hires: 'boundary',
69+
})
70+
},
6571
}
6672
}

0 commit comments

Comments
 (0)