Where Is the SvelteKit Config File?
SvelteKit reads svelte.config.js at the project root, naming the adapter and kit file handling.
Last updated
SvelteKit configures from svelte.config.js at the project root. The adapter choice and kit directory options live there in a small JavaScript file. Routes build from the src/routes folder by convention.
Adapters decide the deploy target per file. Swap adapter-auto for a platform adapter when leaving local dev. Vite settings stay in vite.config.ts, which keeps the two files focused on separate jobs.
Where SvelteKit stores this, by platform
[ProjectDir]/svelte.config.js
Root config with adapter and kit options. Routes live under src/routes by convention. Build output lands in build or .svelte-kit per adapter.
[ProjectDir]/svelte.config.js
Same root file on Mac. Static content serves from the static folder beside src. Keep both configs in version control.
[ProjectDir]\svelte.config.js
Same file on Windows. Adapter packages install as normal dependencies. Generated folders stay out of git.
Frequently asked questions
How do I change the SvelteKit deploy target?
Install the platform adapter and name it in svelte.config.js. Each adapter documents its own output folder. Rebuild after switching.
Where are SvelteKit routes?
As files under src/routes with +page and +layout conventions. The config never lists routes individually. Add files to add pages.
Notice an outdated path? Let us know.