-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
Describe the bug
For the dev mode, I am using Babel for transpiling typescript and not esbuild which is turned off inside vite.config.
In that case all sourcemaps (..."sources":["app.ts"]) have only relative paths and not absolute path as they have when esbuild is used. It seems that default rollup sourcemap settings are used because exactly the same output I am getting using only rollup.
There is not way to create sourceMaps with absolute path or maybe I miss something.
e.g.
sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => {
// will replace relative paths with absolute paths
return path.resolve(
path.dirname(sourcemapPath),
relativeSourcePath
);
},
Reproduction
https://stackblitz.com/edit/vitejs-vite-kn5643?file=vite.config.js
System Info
npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsersUsed Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable