-
-
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
Deploying static site to subfolder leads to 404s for most assets in SvelteKit v1.22.1 #10358
Comments
I think this is caused by the preload This duplicate preloads are also causing the double CSS as reported in #10379 |
Ugh, I've completely overlooked this and found out the /** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
- paths: {
- base: dev ? '' : '/build',
- relative,
},
}),
+ paths: {
+ base: dev ? '' : '/build',
+ relative,
+ },
},
} Aside from this, you've helped discover a bug when |
Oh nooooo, I'm so sorry! You're absolutely right. When configured correctly, the problem does not occur. I don't know if that's possible, but maybe the TypeScript types for the SvelteKit/Adapter Again, I'm really sorry for wasting your time with this. Thank you for helping me, and thank you for being so kind about it! (And I'm glad I was at least able to help discover another bug.) |
Describe the bug
Starting with SvelteKit 1.22.1, using
adapter-static
to deploy to a subfolder no longer works. It seems likely that the change from https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%401.22.1 is responsible:I noticed probably relevant changes in
build/_app/immutable/entry/app.*.js
:../chunks/...
_app/immutable/chunks/...
, which does not work.@benmccann suggested that
paths.relative
may fix it, but it doesn't seem like that to me.I prepared a minimal reproduction that demonstrates and explains this better than a lot of prose, I think.
My current workaround is to downgrade back to SvelteKit 1.22.0.
Reproduction
https://github.com/danieldiekmeier/reproduction-sveltekit-relative
Reproduction steps are in the README.md.
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: