#6994·sst

Docs/init: SvelteKit setup references svelte.config.mjs, but Kit 3 config lives in vite.config.ts

Author: AlperSakaryaCreated Aug 30, 2026Updated Aug 30, 2026

Description

The SvelteKit on AWS setup docs and the sst init flow instruct users to add the svelte-kit-sst adapter to a svelte.config.mjs file:

It'll also ask you to update your svelte.config.mjs with something like this.

diff
- import adapter from '@sveltejs/adapter-auto';
+ import adapter from "svelte-kit-sst";

Under SvelteKit 3 (and the current sv create scaffolding), there is no svelte.config.* file at all — SvelteKit configuration now lives in the sveltekit() Vite plugin inside vite.config.ts. As a result:

  • sst init's "patch svelte.config" step has no file to modify.
  • Following the docs verbatim leaves users with nowhere to put the adapter, and the adapter has to be wired into vite.config.ts manually.

Reference

SvelteKit 3 migration guide — svelte.config.js is no longer supported: https://next.svelte.dev/docs/kit/migrating-to-sveltekit-3

Instead of declaring project configuration in svelte.config.js, it must now be passed to the sveltekit Vite plugin in vite.config.js. Options that previously lived under config.kit.* are now top-level plugin options, alongside things like compilerOptions.

Example of the new location:

typescript
// vite.config.ts
import { defineConfig } from 'vite';
import { sveltekit } from '@sveltejs/kit/vite';
import adapter from 'svelte-kit-sst';

export default defineConfig({
  plugins: [
    sveltekit({
      adapter: adapter()
    })
  ]
});

Related

This is the docs/init counterpart to the adapter runtime incompatibility reported in #6993 (the generated Lambda handler imports the removed @sveltejs/kit/node/polyfills export). Both stem from svelte-kit-sst / the SST Svelte docs predating SvelteKit 3.

Expected

Update the SvelteKit setup docs and the sst init flow to reflect that adapter configuration now lives in the sveltekit() plugin in vite.config.ts, rather than svelte.config.mjs — ideally once svelte-kit-sst itself supports SvelteKit 3.

Environment

Package Version
sst 4.17.1
svelte-kit-sst 2.43.5
@sveltejs/kit 3.0.0-next.25
@sveltejs/vite-plugin-svelte 7.3.0
svelte 5.57.0
vite 8.2.2