ItalyPaleAle / svelte-spa-router

Router for SPAs using Svelte 3
MIT License
1.55k stars 106 forks source link

Feature request: Svelte 4 support #302

Closed JeviScript closed 10 months ago

JeviScript commented 1 year ago

Hey! Just wanted to ask if there is a plan to update the lib to support Svelte 4? As it stands it does not compile for Svelte 4 giving typescript errors when using wrap function. Current workaround is typecast it like so:

  const routes = {
    "/home": wrap({
      asyncComponent: () => import("./routes/Home.svelte") as Promise<{default: typeof SvelteComponent}>,
}
mikeychowy commented 1 year ago

I'll maybe open a PR for svelte 4 support when I have the time, the migration script should be doing all the heavy lifting so it'll be a quick update

ItalyPaleAle commented 1 year ago

👋 I think we definitely do want svelte 4 support.

I will not be able to look into this until next weekend at the earliest. But I welcome any PR!

It may be a good opportunity to also go through with some breaking changes.

mikeychowy commented 1 year ago

created a PR here

laoshaw commented 1 year ago

When will this be merged? this project is what made me to stay with Svelte, I don't like sveltekit's SSR-first approach as I only need CSR SPA for all my projects, as I can not run node.js(SSR) on my boards due to hardware resource constraints. Thanks.

boustanihani commented 1 year ago

Please merge and support Svelte-4.

Svelte-5 is also on its way :)

DirkRaeder-KDO commented 11 months ago

@ItalyPaleAle any update on this?

ItalyPaleAle commented 11 months ago

@mikeychowy are you still planning on working on this?

doregex commented 11 months ago

I might look into it on Thursday or Friday to perform the @mikeychowy changes without the linter to support svelte4.

@ItalyPaleAle hai tempo di darci un occhio nel weekend nel caso?

carbogninalberto commented 11 months ago

I opened the PR https://github.com/ItalyPaleAle/svelte-spa-router/pull/309 bumping the changes from @mikeychowy I tried to build the test app and it's working, but I am unsure of how to run the automated tests

carbogninalberto commented 11 months ago

@ItalyPaleAle did you have time to take a look?

ItalyPaleAle commented 11 months ago

@ItalyPaleAle did you have time to take a look?

Thanks for the PR! I will get it merged later today. Right now the CI is broken and I'll have to fix that first.

Expect a release in about 24 hours

ItalyPaleAle commented 10 months ago

Thanks @carbogninalberto for the PR. I fixed the linter issues and merged it.

I am going to do some additional validation tomorrow and then cut the release

ItalyPaleAle commented 10 months ago

Version 4.0.0 has been released with Svelte 4 support!