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
Typescript sourcemaps resolve to absolute full path when running live #4657
Comments
I couldn't reproduce the problem on mac. System: |
I came here looking for a solution to a similar issue. I'm also on Windows, and am seeing the same results with an even simpler repro:
From Chrome DevTools: From Firefox DevTools: In both cases the second It looks like there needs to be a way to specify a "root" folder that gets stripped? |
Looks like the problem isn't with $ yarn esbuild D:/projects/qc/tempvite2/vite-project/src/main.ts --sourcemap
import App from "./App.svelte";
export function test(a) {
return a + 1;
}
const app = new App({
target: document.getElementById("app")
});
export default app;
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL21haW4udHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCBBcHAgZnJvbSBcIi4vQXBwLnN2ZWx0ZVwiO1xuXG5leHBvcnQgZnVuY3Rpb24gdGVzdChhOiBudW1iZXIpOiBudW1iZXIge1xuICAgIHJldHVybiBhICsgMTtcbn1cblxuY29uc3QgYXBwID0gbmV3IEFwcCh7XG4gICAgdGFyZ2V0OiBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcImFwcFwiKSxcbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBhcHA7XG4iXSwKICAibWFwcGluZ3MiOiAiQUFBQTtBQUVPLHFCQUFjLEdBQW1CO0FBQ3BDLFNBQU8sSUFBSTtBQUFBO0FBR2YsTUFBTSxNQUFNLElBQUksSUFBSTtBQUFBLEVBQ2hCLFFBQVEsU0FBUyxlQUFlO0FBQUE7QUFHcEMsZUFBZTsiLAogICJuYW1lcyI6IFtdCn0K Checking the |
We have a windows container running tests 🤔 Line 24 in 99a35b2
So why tests are running there? |
OK, using that as an example, tests seem to pass. Probably the difference was So now I have a potentially working dev environment. Open question is whether I feel like putting the time in to fix the bug. I'll have to see what my schedule looks like. It doesn't help that the repo that I converted to The rabbit hole just gets deeper... |
@Shinigami92 Looking at using Vite for another project now, and I have some free time. I'll dive in and see if I can track down why the path is so broken. It looks like the philosophy of Vite is to make things Just Work by default, so I assume the preference would be to, on Windows, change the paths to be something that's correct, and not hide the change behind a new configuration option? |
From what I know, yes, if it is possible to not hide something behind an option, I think it's always better ^^ |
I started on it, but in my experimenting I discovered that you can now debug correctly in Chrome and in Firefox. We're still seeing two copies of each file, but if you place the breakpoints in the "D:/" drive versions (as shown above) everything works as expected, or well enough to make no difference. Given that meets my minimum requirements, I'm not going to try to poke at it any more for now. Paid work calls. |
I have the same issue. |
Looks like its fixed in vite 3 (tested with vite 3 beta 4). At least in my case |
Describe the bug
Similar to #137 typsecript sourcemaps resolve to absolute full path when running live.
Reproduction
Which resolves to (Please note the absolute path):
Also in DevTools you see duplicate entries, which leads to some strange behavior at debug:
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: