Skip to content

breaking: move Config type - #16752

Merged
Rich-Harris merged 15 commits into
version-3from
move-config-types
Aug 12, 2026
Merged

Rich-Harris merged 15 commits into
version-3from
move-config-types

Conversation

@Rich-Harris

@Rich-Harris Rich-Harris commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Another piece of #16676. This began as 'we should probably move Config to @sveltejs/kit/vite and quickly became 'oh, we can simplify a ton of stuff that I've been meaning to get round to'.

It requires some corresponding changes on the svelte.dev side, which I have locally. We should merge this first though so we can cut a release, and I'll follow up with the changes over there


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 4a67104:

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

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

@changeset-bot

changeset-bot Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4a67104

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rich-Harris
Rich-Harris marked this pull request as ready for review August 12, 2026 14:39
@Nic-Polumeyv

Nic-Polumeyv commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

svelte-package still reads options.config.kit?.alias / outDir (and config.kit?.files?.lib in cli.js), but its load_config() returns api.options, which is now the flattened config, so those all fall back to defaults.

The ...svelte_config.vitePlugin spread is gone and vitePlugin isn't in kit_options, so it gets forwarded to vite-plugin-svelte as an unknown inline option and ignored. Probably wants a removed() entry like kit got.

PR below fixes this

Fixes for
#16752 (comment). The
cli.js `files.lib` fallback is dead either way now that the schema
errors on it — flattened rather than deleted, delete if you prefer.
@Rich-Harris
Rich-Harris merged commit 2c4e73d into version-3 Aug 12, 2026
26 of 27 checks passed
@Rich-Harris
Rich-Harris deleted the move-config-types branch August 12, 2026 17:37
teemingc added a commit that referenced this pull request Oct 21, 2026
…17512)

- Kit injects an identity `typescript.config` callback even when
omitted, preventing ESLint from serializing the loaded configuration
with `--cache`.
- Configuration flattening in
[#16752](#16752) exposed this
default; [#16458](#16458) already
made transforms optional. Remove the redundant callback rather than
special-casing ESLint serialization.
- Preserve explicit callbacks, validation/deprecation diagnostics, and
service-worker configuration separation. Cover cached linting and
mutation/replacement callbacks; user-supplied non-serializable functions
remain subject to ESLint’s restrictions.

Fixes #17511

<!--
svelte-triage-bot:feedback-baseline:c8d33279e1caaf83433bf96b531421a376571d69
-->

---------

Co-authored-by: svelte-triage-bot <team@svelte.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
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.

Move types to the modules they concern

3 participants