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
When declaring snippets with the same name inside separate component slots, you get a compiler error for '<name>' has already been declared, even though they shouldn't be sharing the same scope.
e.g.
<script>
import Box from './Box.svelte';
</script><Box>{#snippet children()}Hello{/snippet}
</Box><Box>{#snippet children()}
World
{/snippet}</Box>
The second children snippet gives an error of 'children' has already been declared, even though each snippet should have their own respective scope.
Workaround for now is creating the snippet with a different name, and passing it as a prop to the component.
e.g.
<Box>{#snippet children()}
Hello
{/snippet}
</Box><Boxchildren={children2}>{#snippet children2()}
World
{/snippet}</Box>
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When declaring snippets with the same name inside separate component slots, you get a compiler error for
'<name>' has already been declared
, even though they shouldn't be sharing the same scope.e.g.
The second
children
snippet gives an error of'children' has already been declared
, even though each snippet should have their own respective scope.Workaround for now is creating the snippet with a different name, and passing it as a prop to the component.
e.g.
Reproduction
Reproduction
Logs
System Info
REPL Chrome
Severity
annoyance
The text was updated successfully, but these errors were encountered: