Skip to content

Commit

Permalink
fix: adjust vue template sourcemap (#6972)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demivan authored Feb 18, 2022
1 parent 55589db commit a774303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-vue/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export async function transformMain(
const generator = SourceMapGenerator.fromSourceMap(
new SourceMapConsumer(map)
)
const offset = scriptCode.match(/\r?\n/g)?.length || 1
const offset = (scriptCode.match(/\r?\n/g)?.length ?? 0) + 1
const templateMapConsumer = new SourceMapConsumer(templateMap)
templateMapConsumer.eachMapping((m) => {
generator.addMapping({
Expand Down

0 comments on commit a774303

Please sign in to comment.