JH← Back to blog

SvelteKit Just Moved Config Into vite.config.js — Here's Why That's Bigger Than It Sounds

SvelteKit's July 2026 release lets you configure Kit directly in vite.config.js and previews SvelteKit 3's breaking changes. Here's the migration path.


SvelteKit's July 2026 release, version 2.62.0, quietly changes something that's been a fixed part of the framework's identity since its earliest days: the separate svelte.config.js file. Developers can now define their SvelteKit configuration directly inside vite.config.js and skip a standalone Svelte config file entirely — a change framed explicitly as a preview of how SvelteKit 3 will require configuration to live going forward. It arrived alongside a batch of breaking changes to form error typing, tracing, $app/stores, remote function file rules, and param files. None of this is a headline-grabbing feature the way a new rendering mode or a performance benchmark would be. But for teams maintaining SvelteKit applications, it's exactly the kind of unglamorous structural shift that determines how painful your next major-version upgrade turns out to be.

What actually changed: config consolidation, not a rewrite

The core change is that you can now pass your SvelteKit config directly to the Vite plugin inside vite.config.js, rather than maintaining it in a separate svelte.config.js file that Vite then reads. This isn't a rewrite of how SvelteKit works internally — it's a consolidation of where configuration lives, motivated by the fact that Vite has increasingly become the single source of truth for build tooling configuration across the broader JavaScript ecosystem, and maintaining a second, framework-specific config file alongside it has become an artifact of history rather than a deliberate architectural choice.

That consolidation matters more than it might first appear, because SvelteKit has confirmed this isn't an optional convenience feature developers can ignore if they prefer the old pattern. Since SvelteKit 3.0.0, you will be required to pass configuration directly through vite.config.js — the current 2.62.0 release is explicitly a preview of that eventual requirement, not a permanent alternative path. Teams that adopt the new pattern now are getting ahead of a change that's coming regardless; teams that stick with svelte.config.js are accumulating migration work they'll eventually have to do anyway, just later and likely under more time pressure during an actual major-version upgrade.

The breaking changes riding alongside the config shift

The same release cycle brought several breaking changes that development teams need to account for before upgrading, and they're specific enough to warrant a checklist rather than a general "review the changelog" instruction. The form.error type changed from any to App.Error | undefined — a stricter, more accurate type that will surface type errors in codebases that were previously relying on the looser any typing to paper over inconsistent error-handling patterns. Tracing was moved out of the experimental namespace entirely, and the instrumentation flag was removed, meaning any code or configuration referencing that flag will break outright rather than simply emitting a deprecation warning.

$app/stores was removed as a module, which affects any codebase still importing from it rather than having migrated to SvelteKit's newer state-management patterns — this is likely the single change most disruptive for older SvelteKit codebases that haven't kept pace with the framework's evolution away from store-based patterns. Remote function files (*.remote.ts / *.remote.js) are now disallowed unless experimental.remoteFunctions is explicitly enabled in configuration, closing what had been a more permissive default. And param files nested in folders were removed in favor of a params.js/params.ts file convention, which is a structural change to how route parameter validation logic is organized in a SvelteKit project's file tree.

Why this pattern of "boring" breaking changes deserves real migration time, not a skim

It's tempting to read a list of typing changes, namespace moves, and file convention updates as low-stakes housekeeping compared to a flashy new feature — but that instinct is exactly backwards for the teams actually maintaining production SvelteKit applications. Breaking changes to core patterns like $app/stores and remote function file rules don't just require a version bump in package.json; they require an actual audit of every file in a codebase that touches those patterns, and in a codebase that's been through multiple SvelteKit major versions already, that audit can surface old, half-migrated patterns nobody remembers writing.

The stricter form.error typing is a good example of a change that looks trivial in a changelog entry but can generate a meaningful volume of new TypeScript errors across a codebase the moment it's adopted — every place code assumed form.error could be treated as any and got away with loose handling will now need to actually satisfy the App.Error | undefined type, which is the kind of change that's easy to underestimate in a sprint planning estimate and then discover involves touching far more files than expected.

What this signals about SvelteKit's direction more broadly

Beyond the specific technical changes, this release is a useful data point on SvelteKit's overall trajectory. The explicit framing of the vite.config.js consolidation as "how SvelteKit 3 will require config to live" tells development teams something concrete about the framework's roadmap: SvelteKit is moving toward tighter, more opinionated integration with Vite as the single build-tooling layer, rather than maintaining SvelteKit-specific configuration infrastructure in parallel with it. That's broadly consistent with a wider pattern across the JavaScript framework ecosystem in 2026, where meta-frameworks increasingly treat Vite as foundational infrastructure rather than as one interchangeable bundler option among several.

For teams choosing between SvelteKit and competing meta-frameworks, this pattern — SvelteKit deliberately reducing its own configuration surface in favor of Vite's — is worth weighing against frameworks taking a more independent, self-contained configuration approach. Neither strategy is objectively correct, but they carry different tradeoffs for teams that value configuration portability versus teams that prefer a single unified config file shared across build tooling and framework concerns.

How this compares to previous SvelteKit major-version transitions

SvelteKit has been through this kind of transitional period before, most notably during the SvelteKit 1-to-2 migration, and it's worth using that precedent to calibrate expectations for how this one will likely play out. The move to SvelteKit 2 similarly bundled a set of individually modest-looking breaking changes — updated error handling conventions, adjusted cookie API behavior, stricter form action typing — that, in aggregate, required real migration effort from teams maintaining nontrivial production codebases, even though no single change in that release looked dramatic in isolation. Teams that treated that transition as a quick changelog skim generally underestimated the actual migration time; teams that budgeted a real sprint for it, and started early using the preview period before the breaking changes became mandatory, generally came through with less disruption.

This July 2026 release is following the same shape: a preview period where the new pattern (config in vite.config.js) is available but optional, ahead of a future major version where it becomes mandatory. That's a genuinely useful window if teams treat it as one — an opportunity to migrate configuration and audit for deprecated patterns like $app/stores on your own schedule, under normal sprint planning, rather than being forced into the same work under the time pressure of a mandatory major-version upgrade with a harder deadline. The teams that will struggle with SvelteKit 3 when it eventually ships are, almost by definition, the teams treating this preview release as optional busywork rather than as the actual start of their migration timeline.

Practical takeaways

Start migrating configuration into vite.config.js now, even though svelte.config.js remains supported in this release, since SvelteKit has explicitly confirmed this will become mandatory in version 3.0.0 — doing this migration incrementally today is materially less disruptive than doing it all at once during a forced major-version upgrade later. Audit your codebase specifically for $app/stores imports and remote function files before upgrading past this release, since these are the two changes most likely to break existing code outright rather than just emit warnings. Budget real time for the form.error typing change if your codebase relies on loose any-based error handling in forms — treat this as a genuine TypeScript audit task, not a one-line changelog acknowledgment, because the actual scope tends to be larger than it looks on paper. Explicitly enable experimental.remoteFunctions in your configuration if your project uses remote function files, since this release disallows them by default rather than simply deprecating the old behavior. And if you're evaluating SvelteKit against other meta-frameworks for a new project, factor in this deliberate move toward Vite-centralized configuration as a signal of the framework's broader architectural philosophy, not just a minor version-note detail.

Where this leaves teams choosing a meta-framework today

For teams currently evaluating meta-frameworks for a new project rather than maintaining an existing SvelteKit codebase, this release is a useful, if minor, data point in that broader decision. SvelteKit's compiler-driven approach — Svelte compiles away much of its runtime overhead at build time, in contrast to frameworks that ship a larger client-side runtime — has always been its primary differentiator against React-based meta-frameworks like Next.js, and that fundamental tradeoff hasn't changed with this release. What has changed is a signal about SvelteKit's willingness to make deliberate, sometimes disruptive architectural decisions in service of long-term simplicity, even when that means real short-term migration pain for existing users. Teams that value a framework maintainer's willingness to make that tradeoff explicitly, rather than accumulating backward-compatibility cruft indefinitely, should read this release as reassuring; teams that prioritize configuration stability above all else, and dread even well-telegraphed breaking changes, should factor that into how much weight they give SvelteKit against more conservative alternatives.

None of the changes in this release will show up in a demo or a benchmark comparison, and that's exactly why they're easy to underprioritize. But framework maintainers signal their real roadmap through exactly this kind of unglamorous, structural change — and teams that treat "boring" breaking changes as low priority tend to be the same teams surprised by how much work a major-version upgrade turns out to be a year later.