This project represents a small example that shows an issue with Sveltekits default behaviour regarding trailingSlash
introduced in Sveltekit version 1.30.1. The corresponding docs state that Sveltekit removes trailing Slashes by default which does not really work consistently anymore.
trailingSlash
not specifiedpaths.base
default valuehttp://localhost:5173/home/foo/
and the trailing shlash does not get removed. Reloading on this page will lead to removal of the trailing slash as follows http://localhost:5173/home/foo
. This is some inconsistency since I would expect consistent behaviour accross reloads.http://localhost:5173/home/foo/
will cause an issue when using a link where the href
only specifies the child like href="bar"
since it will try to navigate to the non existing route http://localhost:5173/home/foo/bar
. This feature works with Sveltekit removing trailing slashes