mirror of https://github.com/sveltejs/svelte
fix: better support for top-level snippet declarations (#9898)
parent
a8e5cc83cd
commit
0236cf87e7
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: better support for top-level snippet declarations
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
compileOptions: {
|
||||||
|
dev: true // Render in dev mode to check that the validation error is not thrown
|
||||||
|
},
|
||||||
|
html: `<p>hello world</p>`
|
||||||
|
});
|
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
const {children = snippet} = $props();
|
||||||
|
</script>
|
||||||
|
{@render children()}
|
||||||
|
{#snippet snippet()}
|
||||||
|
<p>hello world</p>
|
||||||
|
{/snippet}
|
Loading…
Reference in new issue