Repository navigation
fix: resolve config paths only after we have root - #16229
Merged
Merged
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/5f92e2325e077b157b274feb9090a3a956ba1d5bOpen in |
🦋 Changeset detectedLatest commit: 5f92e23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
teemingc
marked this pull request as draft
July 3, 2026 17:01
teemingc
marked this pull request as ready for review
July 5, 2026 09:34
… service-worker env plugin's `transform` hook spams the console for every transformed client module.
This commit fixes the issue reported at packages/kit/src/exports/vite/index.js:1167
## Bug
In `packages/kit/src/exports/vite/index.js`, the `transform` hook of `plugin_service_worker_env` began with a debugging leftover:
```js
transform(code, id) {
console.log({ service_worker_entry_file, id });
if (id !== service_worker_entry_file) return;
...
}
```
The `console.log` is placed **before** the `id !== service_worker_entry_file` early return, so it executes for *every* module transformed in the client environment whenever a service worker entry file exists.
### Trigger
Any SvelteKit project that has a service worker (`src/service-worker.js` or similar). During dev and build, the client environment transforms many modules, and each call logs `{ service_worker_entry_file, id }`, flooding the console with internal path data.
## Fix
Removed the stray `console.log` line. The remaining `console.log` statements elsewhere in the file are intentional user-facing messages; this one dumped internal variables and was clearly accidental debug output.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: teemingc <[email protected]>
Rich-Harris
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR separates the config processing from the validation because the processing needs to happen after we've retrieved the Vite
rootvalue. This is important for proper monorepo support. Otherwise, tooling such as our language tools and Vitest end up resolving file paths relative to where the process started rather than relative to the project rootPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits