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 2eb1fab commit 0ae86fc
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 0ae86fc

Please sign in to comment.