mirror of https://github.com/sveltejs/svelte
parent
707682eaa9
commit
c43bfebcd7
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: allow accessing snippet in script tag
|
||||
@ -0,0 +1,7 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
dev: true
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,3 @@
|
||||
export function fn(snippet) {
|
||||
return snippet;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import { fn } from "./fn.js";
|
||||
let variable = $state("var");
|
||||
|
||||
fn(test);
|
||||
</script>
|
||||
|
||||
{#snippet test()}
|
||||
{variable}
|
||||
{/snippet}
|
||||
@ -0,0 +1 @@
|
||||
Subproject commit 97817a95d6fa2d3f72c03f04a1e0882a7650cd16
|
||||
Loading…
Reference in new issue