Closed Ennoriel closed 2 months ago
It is not possible to bind a Svelte 4 props to a <svelte:component/> element:
<svelte:component/>
<script> import Test from './Test.svelte' let div </script> <svelte:component this={Test} bind:div />
There is an error: "$$components is not defined".
This seems to be the cause of https://github.com/Ennoriel/svelte-awesome-color-picker/issues/75 For reference: Svelte 5: List of libraries not working out of the box https://github.com/sveltejs/svelte/issues/10359
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACo2OuwrCQBBFf2WYJk1I-jUK_oOdsdDsBAeyD3YnQQn5d3eNKGJjeYdz554Zex4oojrOaM-GUOHeeyxR7j6HONEglHJ0Y-jypYldYC-71rbCxrsgcKAo0AdnoKjqHKq1ViQmUQMJaJ5a29Sfrm1WRnUuPbFkBeTKcTvn_gIXtlqlEtQJTvPGae6ZNCoJIy3l2zbj_-kC0O2p-_LZfAn9bpyWB8l2UJMdAQAA
No response
REPL: running Svelte compiler version 5.0.0-next.152
blocking all usage of svelte
I saw the error as well when I migrated Test to runes
The issue seems to be bind:div in the . Changing that to {div} gets rid of the error
bind:div
{div}
Thanks, that was quick!
Describe the bug
It is not possible to bind a Svelte 4 props to a
<svelte:component/>
element:There is an error: "$$components is not defined".
This seems to be the cause of https://github.com/Ennoriel/svelte-awesome-color-picker/issues/75 For reference: Svelte 5: List of libraries not working out of the box https://github.com/sveltejs/svelte/issues/10359
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACo2OuwrCQBBFf2WYJk1I-jUK_oOdsdDsBAeyD3YnQQn5d3eNKGJjeYdz554Zex4oojrOaM-GUOHeeyxR7j6HONEglHJ0Y-jypYldYC-71rbCxrsgcKAo0AdnoKjqHKq1ViQmUQMJaJ5a29Sfrm1WRnUuPbFkBeTKcTvn_gIXtlqlEtQJTvPGae6ZNCoJIy3l2zbj_-kC0O2p-_LZfAn9bpyWB8l2UJMdAQAA
Logs
No response
System Info
Severity
blocking all usage of svelte