Skip to content

Commit

Permalink
fix: only use build.sourcemap during build
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jun 26, 2022
1 parent 1596f42 commit 7aa6e58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/vite/src/node/utils.ts
Expand Up @@ -1039,9 +1039,10 @@ export function transformStableResult(
): TransformResult {
return {
code: s.toString(),
map: config.build.sourcemap
? s.generateMap({ hires: true, source: id })
: null
map:
config.command === 'build' && config.build.sourcemap
? s.generateMap({ hires: true, source: id })
: null
}
}

Expand Down

0 comments on commit 7aa6e58

Please sign in to comment.