You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For whatever reason the anchor tag hrefs are not changing unlike Svelte 4 behaviour.
Here's a breakdown of what happens with Svelte 4:
During SSR, the links are rendered relative e.g., ./about/.
During hydration / CSR, the links are switched to root relative /base/path/about/.
What's happening with Svelte 5 now:
During SSR, the links are rendered relative e.g., ./about/.
The links are not switched to root relative /base/path/about/ and also do not change when we navigate to another page, e.g., after we navigate from the home page to the about page, the header links are still ./ and ./about/
The reasoning in #9662 turns out to be false: While it's true that the href would resolve to the same URL on the initial page, once you're doing a client-side navigation to a URL at a different depth, the relative path would now point to the wrong location. Therefore we need to repair href hydration mismatches
fixessveltejs/kit#12254
The reasoning in #9662 turns out to be false: While it's true that the href would resolve to the same URL on the initial page, once you're doing a client-side navigation to a URL at a different depth, the relative path would now point to the wrong location. Therefore we need to repair href hydration mismatches
fixessveltejs/kit#12254
Describe the bug
Relative links break when using
"svelte": "^5.0.0-next.1",
+base: '/base/path',
+export const trailingSlash = "always";
eg. tries to go to /base/path/about/about etc.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-wmkfab?file=.vscode%2Fsnippets.json
Click on links up the top
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: