You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filed an issue in melt-ui, melt-ui/preprocessor#57
Cross-posting for visibility in case this actually is a larger issue in svelte's code gen emit ordering.
I think we should preserve the Svelte 4 behavior in legacy mode but introduce the more strict behavior in runes mode (so that we can eventually remove the logic of reordering them)
There's a third option which is requiring an additional flag for this logic (if it's primarily an issue for library-generated code, since client code can always reorder easily):
Pro
encourages library developers to support the new rules (rather than tell users to apply the flag), and at the same time
unblocks the rest of the transition of code to runes for code reliant on broken libraries
Also remove create_block function in favor of calling visit which in turn calls the fragment visitor, to ensure scope is updated correctly
Fixes#11450
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Describe the bug
Filed an issue in melt-ui, melt-ui/preprocessor#57
Cross-posting for visibility in case this actually is a larger issue in svelte's code gen emit ordering.
Reproduction
Starting with melt-ui's basic stackblitz setup:
See
{@const itemId = id}
usage in here:https://stackblitz.com/edit/github-suxd85?file=src%2Flib%2Fcomponents%2FAccordion.svelte
In case the stackblitz repo is broken, run
and change
Logs
Severity
annoyance
The text was updated successfully, but these errors were encountered: