Skip to content
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

[playground] sourcemaps should be 1:many #1099

Open
Rich-Harris opened this issue Jan 8, 2025 · 0 comments
Open

[playground] sourcemaps should be 1:many #1099

Rich-Harris opened this issue Jan 8, 2025 · 0 comments

Comments

@Rich-Harris
Copy link
Member

Most of the time, sourcemaps are 1:1. Sometimes, they're not. In a case like this...

<script>
  let user = $state({ name: 'alice' });
</script>

<input bind:value={user.name}>

...this code is generated in dev mode...

$.validate_binding("bind:value={user.name}", () => user, () => "name", 5, 7);
$.bind_value(input, () => user.name, ($$value) => $.assign(user, "name", $$value, "App.svelte:5:19"));

...and hovering over the user in the editor will only highlight the first of two possible mappings in the output:

image image

Ideally, both would be highlighted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant