Skip to content

[Svelte 5] - Consider support for Svelte 4 (no Runes) and provide clear way to have it not mixed with the new Svelte RunesΒ #9676

@kabaluyot

Description

@kabaluyot

Describe the problem

Our little company was heartbroken by Vue 3 composition API and been learning, migrating, and started building new projects using Svelte 4.

I understand the needs why to add "opt-in" support for Runes (which from the blogs sounds like the way to go in the long run).

It was also mentioned that the current Svelte (Svelte 4 way) will be supported in Svelte 5 (but there's a high chance of being deprecated or not maintained -- see Vue Class Component being ditched vuejs/vue-class-component#632 even after assurances from Vue team)

Describe the proposed solution

Is there a possibility or plan that we can use Svelte 4 and Svelte 5 syntaxes separately and without them being mixed in 1 svelte file?

For example in the <script> tag of a .svelte file for Svelte 5, by default it will support and enforce Runes .. and people cannot anymore add "Svelte 4" related syntax to this to avoid spaghetti codes / mixing.

But if we want to still write using Svelte 4, we can add something like <script classic> or whatever then this file won't accept any Runes related syntaxes and easily support / onboard creating new .svelte using Svelte 4 syntax.

The tags is not necessary, it can also be automatically detected -- just wanted to avoid being mixed.

Alternatives considered

n/a

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions