mirror of https://github.com/sveltejs/svelte
fix: migrated snippet shadowing prop and let directive removal (#13679)
parent
894b1c37ad
commit
ab9eeb46fe
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: migrated snippet shadowing prop and let directive removal
|
@ -0,0 +1,29 @@
|
||||
<script>
|
||||
import Comp from "./Component.svelte";
|
||||
</script>
|
||||
|
||||
<Comp stuff="cool">
|
||||
<div slot="stuff">
|
||||
cool
|
||||
</div>
|
||||
</Comp>
|
||||
|
||||
<Comp stuff="cool">
|
||||
<svelte:fragment slot="stuff">
|
||||
cool
|
||||
</svelte:fragment>
|
||||
</Comp>
|
||||
|
||||
<!-- don't remove the let if we are not migrating -->
|
||||
|
||||
<Comp stuff="cool">
|
||||
<div let:should_stay slot="stuff">
|
||||
cool
|
||||
</div>
|
||||
</Comp>
|
||||
|
||||
<Comp stuff="cool">
|
||||
<svelte:fragment let:should_stay slot="stuff">
|
||||
cool
|
||||
</svelte:fragment>
|
||||
</Comp>
|
@ -0,0 +1,33 @@
|
||||
<script>
|
||||
import Comp from "./Component.svelte";
|
||||
</script>
|
||||
|
||||
<Comp stuff="cool">
|
||||
<!-- @migration-task: migrate this slot by hand, `stuff` would shadow a prop on the parent component -->
|
||||
<div slot="stuff">
|
||||
cool
|
||||
</div>
|
||||
</Comp>
|
||||
|
||||
<Comp stuff="cool">
|
||||
<!-- @migration-task: migrate this slot by hand, `stuff` would shadow a prop on the parent component -->
|
||||
<svelte:fragment slot="stuff">
|
||||
cool
|
||||
</svelte:fragment>
|
||||
</Comp>
|
||||
|
||||
<!-- don't remove the let if we are not migrating -->
|
||||
|
||||
<Comp stuff="cool">
|
||||
<!-- @migration-task: migrate this slot by hand, `stuff` would shadow a prop on the parent component -->
|
||||
<div let:should_stay slot="stuff">
|
||||
cool
|
||||
</div>
|
||||
</Comp>
|
||||
|
||||
<Comp stuff="cool">
|
||||
<!-- @migration-task: migrate this slot by hand, `stuff` would shadow a prop on the parent component -->
|
||||
<svelte:fragment let:should_stay slot="stuff">
|
||||
cool
|
||||
</svelte:fragment>
|
||||
</Comp>
|
Loading…
Reference in new issue