-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default behaviour of trailingSlash violated #11317
Comments
Ran into this in production! Was wondering why I was suddenly getting reports of 404s. Digging into this, I noticed several more things:
Downgrading to 1.30.0 or earlier is my current solution |
* deps: downgrade to fix sveltejs/kit#11317 * fix: fixed the api problems on frontend * feat: improvements to +page.server.ts and moved backend api host to localhost
- see SvelteKit bug: sveltejs/kit#11317 - downgrading to @sveltejs/kit@1.30.0 until we're ready for 2.x - fixes #681
* downgrade sveltekit to fix sveltejs/kit#11317 (see tradingstrategy-ai/frontend@e1bb067 )
For people still bumping on this, the latest 1.x version at the time of writing (1.30.4) still has the code that causes the trailing slash to always be added on navigations from the root page. This was fixed in #11388 - but it seems that fix is only available in 2.x. So your options on ^1.30.1 are either downgrading to 1.30.0, as mentioned above here, or upgrading to 2.x. |
I'm on kit v2.0.0 and have this bug. This:
gives this in the address bar of the browser: |
Describe the bug
SvelteKit will remove trailing slashes from URLs by default according to the docs. This functionality is not fully provided anymore since #10763 got merged.
Using the default value for
paths.base
the trailing slash will be added to any sub route like/home/foo/
. However, this trailing slash will be removed after reloading the page. Moreover, in case of the default value forpaths.base
there is no trailing slash at root.I would expect that the default behaviour of
trailingSlash
page option is still valid for defaultpaths.base
even after merging #10763.Reproduction
A minimal repro example of the issue can be found in this repo.
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: