mirror of https://github.com/sveltejs/svelte
fix: check that snippet is not rendered as a component (#9423)
Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/9438/head
parent
1fd77d7494
commit
9aa06bdf9e
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: check that snippet is not rendered as a component
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
compileOptions: {
|
||||||
|
dev: true
|
||||||
|
},
|
||||||
|
error: 'A snippet must be rendered with `{@render ...}`'
|
||||||
|
});
|
@ -0,0 +1,5 @@
|
|||||||
|
{#snippet Foo()}
|
||||||
|
<p>hello</p>
|
||||||
|
{/snippet}
|
||||||
|
|
||||||
|
<Foo />
|
Loading…
Reference in new issue