You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source maps are seemingly inaccurate when lang="ts" is enabled on the <script> tag. This only occurs when using TS in Svelte 5. Removing lang="ts" fixes the issue.
When presented with the following Svelte code:
Errors locations are accurate in the IDE (as shown above), but are off in both the terminal output, and the error page.
Unfortunately, the issue is still present even with the latest version of Svelte 5. I've updated the dependencies in the reproduction if you'd like to check it out.
However, since messing with the preprocess field here:
Removing vitePreprocess from the preprocess array in svelte.config.js seems to also fix the source maps. Perhaps the issue is originating from there?
I'm thinking that the sourcemaps may actually be borked from the vite-plugin-svelte layer instead. Although, I'm unsure as to why the error highlighting in the IDE vs. the error window that appears on the site (as shown in images of the original issue above) are different from each other 🤔
Describe the bug
Source maps are seemingly inaccurate when
lang="ts"
is enabled on the<script>
tag. This only occurs when using TS in Svelte 5. Removinglang="ts"
fixes the issue.When presented with the following Svelte code:
Errors locations are accurate in the IDE (as shown above), but are off in both the terminal output, and the error page.
Reproduction
https://github.com/AdrianGonz97/svelte-5-ts-source-maps-reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: