Skip to content

Commit

Permalink
fix(config): make stacktrace path correct when sourcemap is enabled (#…
Browse files Browse the repository at this point in the history
…18833)

Co-authored-by: Bjorn Lu <[email protected]>
  • Loading branch information
sapphi-red and bluwy authored Dec 4, 2024
1 parent 81c31c1 commit 20fdf21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,8 @@ async function bundleConfigFile(
format: isESM ? 'esm' : 'cjs',
mainFields: ['main'],
sourcemap: 'inline',
// the last slash is needed to make the path correct
sourceRoot: path.dirname(fileName) + path.sep,
metafile: true,
define: {
__dirname: dirnameVarName,
Expand Down

0 comments on commit 20fdf21

Please sign in to comment.