Skip to content

fix: resolve server-routed CSS against its route module - #17414

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17412-server-resolution-css
Draft

svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17412-server-resolution-css

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor
  • Server-resolved CSS paths were relative to __route.js, but load_css interpreted them against the departing document, causing incorrect requests and duplicate stylesheet links.
  • Resolve dependencies against import.meta.url before loading CSS. Keep the portable paths introduced by #17056 rather than reverting to root-absolute URLs and breaking prefix-stripping proxies.
  • Preserve the dedicated CSS loading from #13498 and SSR stylesheet deduplication from #15014; cover navigation, code/data preloading, and returning from deeper routes.
  • The shared generator covers runtime and prerendered pathname/route-ID modules, including those added by #16576. HTML path helpers and client-side route resolution remain unchanged.

Fixes #17412

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from df04593:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/df045939207742d625980f02bb6553d43cde3682

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17414

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: df04593

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page CSS fails to load after client-side navigation from a deeper page with router.resolution: 'server'

0 participants