Describe the bug
There is only a <script module> and no <script> in the component, but the snippet can not be exported, because the compiler treats the $page subscription as if it were local. If I remove the $ from $page, it can be exported.
Reproduction
<script module>
import { page } from '$app/stores';
export { exampleSnippet }; // type checker error: exampleSnippet not found (undefined export)
</script>
{#snippet exampleSnippet()}
{JSON.stringify($page.data)}
{/snippet}
Logs
No response
System Info
Severity
annoyance