svelte-routing icon indicating copy to clipboard operation
svelte-routing copied to clipboard

Remove special case. It seems to just break SSR.

Open Monadic-Cat opened this issue 1 year ago • 4 comments

I'm not 100% sure this is consistent with every way this might be used, but I ran into basically the same bug as #244, except I'm not using vite-plugin-ssr.

Note that I am on Svelte 4. (4.2.17)

Monadic-Cat avatar Jun 07 '24 14:06 Monadic-Cat

One of the things that lead me to this was that

  <Route component={Home} path="/" />

broke, but

<Route path="/"><Home /></Route>

didn't.

With this change, both appear to work identically. (Which means they work with both client rendering and SSR.)

Monadic-Cat avatar Jun 07 '24 14:06 Monadic-Cat

Thanks for the PR. This will be a breaking change for large amount of people who are using this library. I need to test & wait for the next breaking release which will be after svelte v5 release.

krishnaTORQUE avatar Jun 10 '24 07:06 krishnaTORQUE

Fair enough.

Monadic-Cat avatar Jun 12 '24 20:06 Monadic-Cat

These lines also break component prop in case of svelte 5, as components are not classes anymore

angryziber avatar Oct 29 '24 20:10 angryziber