Skip to content

fix: resolve generated rootDirs from Vite root - #17242

Merged
teemingc merged 2 commits into
version-3from
triage/kit-17241-rootdirs-vite-root
Sep 29, 2026
Merged

teemingc merged 2 commits into
version-3from
triage/kit-17241-rootdirs-vite-root

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor
  • Relative '.' was normalized against process.cwd(), so syncs initiated outside the app rewrote the source side of rootDirs to the wrong directory.
  • The $app/tsconfig overhaul in breaking: overhaul tsconfig #16458 preserved generated-type mapping but replaced the prior absolute-root-derived value with '.'; fix: write the generated tsconfig to node_modules/$app/tsconfig.json #16589 established the current parent-config location.
  • Pass the authoritative Vite/project root through existing normalization, restoring the former invariant; changing normalize_config semantics was rejected because it would affect unrelated normalized fields and callers.
  • Cover default and custom output directories; the shared writer fixes CLI sync, Vite dev/config loading, and build type generation across calling working directories.

Fixes #17241

ghost commented Sep 28, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 55586b6:

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

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

Note

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

ghost commented Sep 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 55586b6

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

@ghost
ghost marked this pull request as ready for review September 29, 2026 21:26
@ghost ghost added the types / typescript label Sep 29, 2026
@ghost
ghost merged commit 12ae0b9 into sveltejs:version-3 Sep 29, 2026
@ghost ghost mentioned this pull request Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rootDirs in the generated $app/tsconfig is resolved against process.cwd() instead of the Vite root

1 participant