Dominik G.
Dominik G.
in svelte5 you can pass in components as props and render them, so still not sure why you want/need a snippet from unplugin-icons itself [repl](https://svelte.dev/playground/hello-world?version=5.25.3#H4sIAAAAAAAAA41Qy2rDMBD8la1acAIhplfXMbSn9hvqHvxYUxFZEtImaTH-964ch1qhgV4EOzua2ZlB6KpHkYlXVMrAyTjVwgpbSdiuxUZ0UqEX2fsg6NsGXgAYn389W7v1R1QUsLry-BfeGE2oiWVE7hsnLRWlLkkhQaDDDpLJN3kKsOytcQQvByKjoXOmh2SbnsdZMyK-NQtaGC6kwCl1nv5a6vzzsTgHHYLzeJenjDA-u3mqHAWN3RDeMeUdByD8IpGRO-C4uVFEdF_cxfXqRh0MewLLbTxYZ6xfra-PryehiTzcyw644su94xSW8gVU5Olymn6lspuYjZLNHnoMDrPq_2Iu-o1DxotlxFYeCwnWISMtkIEaodIgmcP1h21s_cFTJdVJ6lZkXaU8jj97hejCpQIAAA==) dynamic components can also be...
i would recommend you join the svelte discord and create a thread in `#questions-svelte-and-kit` and ask for ideas regarding your dynamic icon usecase instead of working on this solution first....
you can add this code to the end of your script block to manually preserve the `checked` state ```ts if (import.meta.hot) { if (import.meta.hot.data.checked != null) { checked = import.meta.hot.data.checked;...
> It's a shame that by replacing svelte-hmr and vite's default HMR, SvelteKit does not support this functionality anymore. It's kind of a step backwards IMO this was never a...
``` let bar = foo; ``` seems to be essential to trigger the error message, removing it and only using `{@render foo()}` in the template of App.svelte works as expected....
also happens with vps4 / vite5
not sure we have to, as long as you don't use the import in a script block but just reference it in template, it'll be ignored. so if you rename...
wonder if you can trick it with an indirection foo-reexport.js ``` import * as x from './Snippet.svelte; export const foo = x.foo ?? 'whatever'; ``` ``` import {foo} from './foo-reexport.js'...
could you provide a reproduction where the reexport workaround fails like that? i tried here and it still works https://stackblitz.com/edit/github-odonlwum?file=src%2FSnippet.svelte,src%2FApp.svelte,package.json,src%2Fsnippet-reexport.js
thank you for finding that! broken: ``` export { foo }; {#snippet foo()} snippet! {/snippet} ``` works: ``` export { foo }; {#snippet foo()} snippet! {/snippet} ``` as mentioned by...