SvelteKit Config Can Now Be Consolidated Into vite.config.js as of July 2026
The Svelte team announced in July 2026 that SvelteKit's configuration can now be embedded directly inside vite.config.js, eliminating the need for a separate svelte.config.js file. Developers can place all SvelteKit-specific settings, such as adapters, prerendering options, and preprocessors, under a kit key within the sveltekit() plugin call in vite.config.js. The change addresses long-standing friction points including the need to maintain two config files in sync, IDE tooling confusion, and onboarding overhead for new contributors. Migration involves importing the sveltekit plugin from @sveltejs/kit/vite, moving kit-level options into its configuration object, and retaining standard Vite settings at the top level of defineConfig. The consolidation is particularly beneficial for monorepos and projects with complex Vite setups, as the entire build configuration becomes visible in a single file.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in