Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
fix: fix sourcemap for ts
Browse files Browse the repository at this point in the history
fix #70
  • Loading branch information
underfin committed May 29, 2021
1 parent cb3b34c commit 1e03983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Expand Up @@ -27,7 +27,7 @@ export async function transformMain(
)
// script
const scriptVar = 'script'
const { scriptCode } = await genScriptCode(
const { scriptCode, map: scriptMap } = await genScriptCode(
scriptVar,
descriptor,
filePath,
Expand Down Expand Up @@ -94,7 +94,7 @@ function injectStyles (context) {
)
}

let map = descriptor.script?.map
let map = scriptMap
// if script source map is undefined, generate an emty souce map so that
// rollup wont complain at build time when using sourceMap option
if (!map) {
Expand Down

0 comments on commit 1e03983

Please sign in to comment.