Skip to content

fix: resolve client manifest imports against Vite root - #16803

Merged
elliott-with-the-longest-name-on-github merged 1 commit into
version-3from
fix-client-manifest-vite-root
Aug 14, 2026
Merged

fix: resolve client manifest imports against Vite root#16803
elliott-with-the-longest-name-on-github merged 1 commit into
version-3from
fix-client-manifest-vite-root

Conversation

@elliott-with-the-longest-name-on-github

Copy link
Copy Markdown
Contributor

closes #16785

Basically, paths in the manifest are relative to Vite's configured root, but write_client_manifest was resolving them relative to process.cwd(). These are normally the same, but aren't when Vite is started programmatically from another directory, causing the generated client manifest to import route files from the wrong place.

Passes the Vite root through to write_client_manifest and uses it to resolve components, universal modules, and param matchers before generating their imports. Adds a regression test where the project root differs from process.cwd().

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 6abfa51:

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

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

@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6abfa51

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

@svelte-docs-bot

Copy link
Copy Markdown

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.

write_client_manifest resolves route components against process.cwd() instead of Vite root

2 participants