We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13cc840 commit 0742036Copy full SHA for 0742036
packages/vite/src/node/config.ts
@@ -2022,9 +2022,6 @@ async function bundleConfigFile(
2022
},
2023
// disable treeshake to include files that is not sideeffectful to `moduleIds`
2024
treeshake: false,
2025
- // TODO: check if sourcemap works correctly
2026
- // the last slash is needed to make the path correct
2027
- // sourceRoot: path.dirname(fileName) + path.sep,
2028
plugins: [
2029
(() => {
2030
const packageCache = new Map()
@@ -2130,6 +2127,9 @@ async function bundleConfigFile(
2130
2127
const result = await bundle.generate({
2131
2128
format: isESM ? 'esm' : 'cjs',
2132
2129
sourcemap: 'inline',
+ sourcemapPathTransform(relative) {
+ return path.resolve(fileName, relative)
+ },
2133
})
2134
await bundle.close()
2135
0 commit comments