mirror of https://github.com/sveltejs/svelte
parent
efc65d4e0c
commit
61a2943454
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: allow snippets to be exported from module scripts
|
||||
@ -0,0 +1,9 @@
|
||||
<script module>
|
||||
export {
|
||||
foo
|
||||
}
|
||||
</script>
|
||||
|
||||
{#snippet foo(a, b)}
|
||||
Hello world {a + b}
|
||||
{/snippet}
|
||||
@ -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: `Hello world 3`
|
||||
});
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
import { foo } from './Child.svelte';
|
||||
</script>
|
||||
|
||||
{@render foo(1, 2)}
|
||||
Loading…
Reference in new issue