framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Svelte 5 migration

Open vlrevolution opened this issue 1 year ago • 8 comments

I guess we should start discussing migration to Svelte 5 here. Anybody working on it yet?

vlrevolution avatar Nov 03 '24 17:11 vlrevolution

Can the svelte 5 migration script handle this? https://svelte.dev/docs/svelte/v5-migration-guide#Migration-script

Muhammed-Rahif avatar Nov 08 '24 08:11 Muhammed-Rahif

We should also keep backward compatibility with Svelte 4 because not everybody will transition right away due to some core libraries not yet migrated

vlrevolution avatar Nov 08 '24 09:11 vlrevolution

We just need to change the mount, for new projects (which automatically use svelte5).

import {mount} from "svelte"
const app = mount(App,{
  target: document.getElementById('app'),
});

CodeDoes avatar Jan 28 '25 21:01 CodeDoes

@CodeDoes Right, but it's still not refreshing the DOM in Svelte when the variable changes. This was working in Svelte 4.

raiyanihiren avatar Mar 12 '25 09:03 raiyanihiren

Progress on a version for Svelte 5 will be much appreciated 👍

michielwittkampf avatar Jun 29 '25 08:06 michielwittkampf

I'm currently considering using F7 for a Svelte 5 project. Can F7 handle Svelte 5 in legacy mode (no runes, but stores)? Or is F7 fundamentally incompatible with Svelte 5 and one needs to downgrade to Svelte 4?

peterkrueck avatar Aug 13 '25 10:08 peterkrueck

I'm currently considering using F7 for a Svelte 5 project. Can F7 handle Svelte 5 in legacy mode (no runes, but stores)? Or is F7 fundamentally incompatible with Svelte 5 and one needs to downgrade to Svelte 4?

In my tests, a lot does work in legacy mode, but there's some really funky breakage when it comes to "href" based routing / more complex routing scenarios. If your app is super simple spa, it'll probably work fine. I'm still debugging it, but crazy things like a total breakage of reactivity or even the ability to SET a store's value breaks down.

fmp777 avatar Aug 30 '25 17:08 fmp777

https://svelte.dev/docs/svelte/v5-migration-guide#Migration-script

no, due to how its built, svelte's migration script just errors on every component:

@migration-task Error while migrating Svelte code: $$props is used together with named props in a way that cannot be automatically migrated.

fmp777 avatar Aug 30 '25 22:08 fmp777