Skip to content

breaking: move adapter to vite.config.ts#15837

Merged
teemingc merged 11 commits into
version-3from
adapter-vite-config
May 15, 2026
Merged

breaking: move adapter to vite.config.ts#15837
teemingc merged 11 commits into
version-3from
adapter-vite-config

Conversation

@Rich-Harris
Copy link
Copy Markdown
Member

#15574 has become somewhat overwhelming; thought I might experiment with extracting some of the changes into more manageable PRs that are useful independently of the env API stuff.

This PR moves the adapter option from svelte.config.js to vite.config.ts. This is valuable in its own right, since it makes it possible for adapters to include their own Vite plugins, without the need to awkwardly hack around the timing of config resolution (for example, you could imagine an adapter providing platform-specific routes in dev/preview). That part isn't implemented in this PR though, that can be a follow-up — for now, it just moves the option.

Draft because I had Opus do the work, and I haven't yet looked closely at the diff (either against version-3, or against fetchable-dev-environment)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

🦋 Changeset detected

Latest commit: a8198a7

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 Major

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

@svelte-docs-bot
Copy link
Copy Markdown

Comment thread packages/kit/src/exports/vite/index.js
Comment thread packages/kit/src/types/internal.d.ts
Copy link
Copy Markdown
Member

@teemingc teemingc left a comment

Choose a reason for hiding this comment

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

I've looked through the changes, comparing them with the changes in #15780 and #15574 . Looks good. I've commented on just two things that were missing. The svelte.dev deployment also builds successfully after I moved the adapter to the Vite config https://vercel.com/svelte/svelte-dev/GP8NKd3kTLEYi4nEob8AUQSQgE4P

@Rich-Harris Rich-Harris marked this pull request as ready for review May 15, 2026 11:18
@teemingc teemingc merged commit f09f84e into version-3 May 15, 2026
19 of 20 checks passed
@teemingc teemingc deleted the adapter-vite-config branch May 15, 2026 12:05
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