-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
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