sveltejs / svelte · Issue No. 18704
I configured a Sveltekit app with Wuchale and the Sveltekit inspector
Wuchale use a Vite plugin in order to modify the code before passing it to the Svelte compiler.
It work very well, but this causes incompatibility issues with the Sveltekit inspector.
Without Wuchale, the inspector say that the <p>Hello</p> is on line 2:1, witch is fine.
With Wuchale, the inspector say that the <p>Hello</p> is on line 26:1 !
It's negligible for small files like that, but it becomes a problem with larger files.
Wuchale seems to generate a correct source map, but it appears the Svelte compiler isn't using it to generate the $.add_locations() calls in dev mode, and so the inspector ends up with incorrect positions.
I think that the compilet should use previous sourcemap in order to generate valid locations, or at least as close as possible to the original file...
https://www.sveltelab.dev/94k3183ms73kxd4
Start the inspector mode and point out the <p>Hello</p>. It say +page:26:1
-
Sveltelabs
annoyance
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.