While this reproduction does show a bug in SvelteKit, it's not like I described below. I actually misconfigured the paths, like s3812497 described here: https://github.com/sveltejs/kit/issues/10358#issuecomment-1654297295
With a fixed config, the problem does not occur.
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:
perf: only have Vite generate relative paths when required
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.
pnpm i && pnpm i @sveltejs/[email protected] && pnpm build:normalpnpm i && pnpm i @sveltejs/[email protected] && pnpm build:normalpaths.relative does not fix it:pnpm i && pnpm i @sveltejs/[email protected] && pnpm build:relative