trailingSlash
option not working correctly or consistently in SvelteKit 2
#11382
Labels
trailingSlash
option not working correctly or consistently in SvelteKit 2
#11382
Describe the bug
A static site using +layout.ts
Navigating to the website includes a trailing '/' (due to gh pages 301 redirect):
https://captaincodeman.github.io/svelte-headlessui/
Inspecting a link shows the correct URL in the HTML without any trailing slash (also when viewing page source):
But clicking the link takes you to the URL with the trailing slash added:
https://captaincodeman.github.io/svelte-headlessui/combobox/
This causes relative paths to be incorrect (in this case, an iframe src) resulting in a 404:
Have tried every combination of
paths.relative
andtrailingSlash
, all fail in some way.Removing the trailing slash manually (on a non root page) fixes the rendering and also subsequent navigation.
Reproduction
Live site: https://captaincodeman.github.io/svelte-headlessui/combobox/
Source: https://github.com/CaptainCodeman/svelte-headlessui
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
Most routes use a [...slug] route.
The text was updated successfully, but these errors were encountered: