-
-
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
Invalid output and infinite redirect loop with adapter-static
and trailingSlash: "always"
#1486
Comments
adapter-static
and trailingSlash: "always"
adapter-static
and trailingSlash: "always"
The value of |
I'm aware of that, though it does have some impact - SvelteKit rewrites the urls client-side upon navigation |
Yayy, found a workaround - all my pages are interlinked, so I can rely on crawling and set |
Probably related to this: I am getting an infinite redirect loop even without |
* fix: normalize trailing slash in prerender (#1486) * this is a camelCase-free zone, except for public APIs Co-authored-by: Rich Harris <[email protected]>
Describe the bug
Only
<meta http-equiv="refresh" content="0;url=/test/">
is written tobuild/test/index.html
when using static adapter and always trailing slash.Logs
None, build runs successfully, maybe just that
301 /test -> /test/
is printed during build.To Reproduce
Use
npm init svelte@next test
, choose skeleton project.Create a page
src/routes/test/index.svelte
with any content (<p>hello</p>
). Havesvelte.config.js
like this:Reproduction repo with individual setup steps in https://github.com/mvolfik/probable-disco
Expected behavior
No redirects should be needed at all.
build/test/index.html
should contain normal html page with<p>hello</p>
.Stacktraces
N/A
Information about your SvelteKit Installation:
Diagnostics
Severity
Bad bad. Makes
adapter-static
unusable withtrailingSlash: "always"
.Additional context
There is one similar issue #1346, but that is apparently caused by Netlify redirects, while this is only sveltekit.
The text was updated successfully, but these errors were encountered: