Component.svelte:
<script>
export function test(){
return "test";
}
</script>
App.svelte:
<script>
import { test } from "./Component.svelte" // error;
let testValue = $state(test())
</script>
<h1>{testValue}</h1>
Is there a way to export a function from the component? But without actually mounting the component
Or is there some way to replicate vuejs portal, but without mounting the full component?