-
-
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
replace %svelte.assets% with relative path #3234
Conversation
🦋 Changeset detectedLatest commit: a854e31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
❌ Deploy Preview for kit-demo failed. 🔨 Explore the source changes: a854e31 🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/61d87da58e8a7e00079aedb5 |
The deployments are failing because they're trying to build with the most recent released version of Kit, which doesn't know how to handle |
It should, yeah. I need to look into #3232 |
@Rich-Harris should I port the relevant docs over from #3088 ? |
Fixes #2697, supersedes #3088. Replaces
%svelte.assets%
insrc/app.html
with a relative path to the root (or topaths.assets
in production, if specified).In other words this...
...will work regardless of whether
paths.assets
is set, and will also work if you've setpaths.base
(or, in future, if we implement dynamic basepaths somehow) because a page like/custom-basepath/foo/bar/baz
will link to../../favicon.png
, which resolves to/custom-basepath/favicon.png
. It will still work iftrailingSlash
is"always"
.(Note that there's currently a bug around
paths.base
— static assets aren't served from there in dev mode. Needs fixing separately.)Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0