Skip to content

fix: resolve root per instance of the SvelteKit Vite plugin#16513

Merged
Rich-Harris merged 3 commits into
version-3from
instance-level-root
Jul 25, 2026
Merged

fix: resolve root per instance of the SvelteKit Vite plugin#16513
Rich-Harris merged 3 commits into
version-3from
instance-level-root

Conversation

@Rich-Harris

Copy link
Copy Markdown
Member

The other side of sveltejs/language-tools#3084. This fixes a case where svelte-check sometimes fails by reading multiple Vite configs in the same process, getting the root mixed up between them

Either fix should prevent svelte-check raciness, but both should be applied.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 25, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 875307f:

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

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

@changeset-bot

changeset-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 875307f

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


const message =
`\n${styleText(['bold', 'red'], path.relative(root, filename))}\n` +
`\n${styleText(['bold', 'red'], path.relative(process.cwd(), filename))}\n` +

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making paths relative to process.cwd() is more appropriate, since that way printed filenames stay cmd-clickable

if (basename.startsWith('+layout.') && !has_children(content, true)) {
const message =
`\n${styleText(['bold', 'red'], path.relative(root, filename))}\n` +
`\n${styleText(['bold', 'red'], path.relative(process.cwd(), filename))}\n` +

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@svelte-docs-bot

Copy link
Copy Markdown

Comment thread packages/kit/src/exports/vite/index.js Outdated
@Rich-Harris
Rich-Harris merged commit b596610 into version-3 Jul 25, 2026
21 checks passed
@Rich-Harris
Rich-Harris deleted the instance-level-root branch July 25, 2026 16:57
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.

2 participants