-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot change SourceMaps path if esbuild is not used #8081
Comments
What is the reason you want to change sourcemap paths during dev? |
Because breakpoints and debugging within vscode don't work. |
Then, I think if #2950 is implemented, it is possible to solve with |
That would also solve my problem, just I don't have any patter which I could replace. I could solved those paths problems on my side by using custom createBabelInputPluginFactory after that I had still problems with svelte which I solved with using experimental: dynamicCompileOptions. That experience was painful. It would be great if default sourcemapPathTransform from rollup could be changed for vite dev. |
I stumbled over the same issue but with a different use case. I have some folders linked into the workspace using symbolic links. For some reasons, that breakpoint resolution within symlinked files is not working (Windows) so I tried out using sourceMapPathOverrides option to workaround it. It took me a couple of hours until I found out that the sources are just plain file names without any path information. This also prevents me from using sourceMapPathOverrides to point to the symlinked files so that the breakpoints get resolved. With some hardcoded mapping (e.g. "myfile.ts": "<path-to-the-same-symlinked-filed") works Is there any workaround to get path information into the source map file information? |
is this solved ? I still can not debug Vite+React+TS. the breakpoints just dont hit |
Got the same problem while debugging |
Closing as the VSCode debugger should work with JS files by #13514 |
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.
Reproduction
https://stackblitz.com/edit/vitejs-vite-kn5643?file=vite.config.js
System Info
npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: