-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
Describe the problem
#snippet is a feature i’ve really wanted, great news! Related to this feature, is that i’ve found myself defining many locally used objects inside the global script tag in a +page, which could just as well been defined locally in a tag and only be used there. I have no idea about the complications of this, but may this be considered in some version of Svelte?
Describe the proposed solution
It would be awesome to define local script tags or just local variables, either within a tag in a +page or a #snippet, or both. Here is a small example: https://svelte.dev/repl/8492f743da224435b860620f74096991?version=4.2.3
Alternatives considered
Components can be used to solve this, but I think these would not fit these cases properly.
Importance
nice to have
Metadata
Metadata
Assignees
Labels
No labels