Closed
Description
Describe the bug
Sapper was gracefully handling non-root basepaths by injecting a <base>
tag into <head>
in place of %sapper.base%
. SvelteKit doesn't have that, but it does have kit.paths.base
. By changing it, the auto-generated URLs of SvelteKit are rebased, but if there were any previous static URLs, for example, a favicon in app.html
, these URLs will be broken.
Due to the fact that there are now both rebased and non-rebased URLs on a page, this can no longer be remedied by injecting a <base>
tag with a hook, as @benmccann suggested in illright/attractions#311 (comment).
Reproduction
https://github.com/illright/sveltekit-repro-basepath
Logs
No response
System Info
System:
OS: Linux 5.14 Manjaro Linux
CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
Memory: 3.16 GB / 7.62 GB
Container: Yes
Shell: 3.3.1 - /usr/bin/fish
Binaries:
Node: 16.11.0 - /usr/bin/node
npm: 8.0.0 - /usr/bin/npm
Browsers:
Firefox: 93.0
npmPackages:
@sveltejs/adapter-static: ^1.0.0-next.21 => 1.0.0-next.21
@sveltejs/kit: next => 1.0.0-next.191
svelte: ^3.42.6 => 3.44.0
Severity
blocking all usage of SvelteKit
Additional Information
This blocks reliable deployment of SvelteKit-generated websites to GitHub Pages.