Deploy guide
How to deploy SvelteKit
SvelteKit builds your site to a folder of plain files. Here's how to build it, which folder to publish, and the setup on each host.
npm run buildbuild
Pick a host
Where do you want it?
Fastest99helpersRun
npm run build and drop the build folder. No git, no workflow file, no build settings: live in seconds, with passwords, analytics and AI editing built in.SvelteKit on GitHub PagesFree hosting for static sites straight from a GitHub repository.SvelteKit on NetlifyBuilds and hosts sites from a git repository, with forms and serverless functions.SvelteKit on VercelHosting for frontend frameworks, especially Next.js, deployed from git.SvelteKit on Cloudflare PagesStatic sites and full-stack apps on Cloudflare's network, deployed from git or by upload.Before any host
Build it
Install the static adapter (npm i -D @sveltejs/adapter-static), use it in your config, and add export const prerender = true; to src/routes/+layout.js so every page is built to a file.
import adapter from '@sveltejs/adapter-static';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
sveltekit({
adapter: adapter(),
}),
],
});Run npm run build. The site comes out in build: that folder is what goes online, whichever host you pick.
Good to know
Worth knowing first
- SvelteKit 2 keeps the adapter in
svelte.config.jsunderkit.adapter; SvelteKit 3 moved it into thesveltekit()plugin invite.config.js, as shown here. The options are the same.
Or skip the setup
Drop it in. It's online in seconds.
A file, a folder or a whole site: 99helpers puts it online at its own address, with no git, no build settings and no DNS to start with. Add your own domain whenever you're ready.