Closed r-unruh closed 2 months ago
If you dont enable runes, $props will work? Maybe it is better to add a new svelte-runes
compiler updating svelte compiler logic.
Yeah, if you don't force runes, $$props
will still work in Svelte 5. However, $props
will probably be the recommended way soon.
In my opinion, adding a new compiler makes things more complicated for the user. Instead of a straightforward single "svelte" option there would now be choices to make.
my question is about using svelte5 without runes, will $props
work?
If you excplicitly disable runes mode $props
won't work in Svelte 5.
Which is a good point.
Describe the bug
If you force your compiler into Svelte 5 runes mode as documented:
...and use an icon anywhere in a component, you get the following error:
The solution is to use
$props
instead of$$props
. Of course, this would break Svelte <5 support.Reproduction
Use Svelte 5 Alpha - opt into runes-only mode - use this library as usual
System Info
Used Package Manager
npm
Validations