Deploy guide

How to deploy SvelteKit to Netlify

The settings to enter and where to find them: SvelteKit on Netlify, built on every push.

Checked 16 October 2026

In short

The settings

Build command
Publish directory

Step by step

Set it up

  1. 1

    Set up SvelteKit for a static build

    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.

    vite.config.js
    import adapter from '@sveltejs/adapter-static';
    import { sveltekit } from '@sveltejs/kit/vite';
    import { defineConfig } from 'vite';
    
    export default defineConfig({
      plugins: [
        sveltekit({
          adapter: adapter(),
        }),
      ],
    });
  2. 2

    Put the project in a Git repository

    Push it to GitHub, GitLab or Bitbucket. Netlify builds from the repository, so the build folder (build) doesn't need to be committed.

  3. 3

    Import it in Netlify

    Start a new project from the repository and give Netlify access to it when it asks.

    Projects→Add new project→Import an existing project

  4. 4

    Check the build settings

    Fill in the build settings like this:

    Build command
    Publish directory
  5. 5

    Deploy

    Start the deploy. When the build finishes, the site is at https://YOUR-SITE.netlify.app. Each push to the main branch deploys again, and other branches and pull requests get preview links.

    To change the settings later: Project configuration → Developer settings → Continuous deployment → Build settings.

Good to know

Common snags

  • SvelteKit 2 keeps the adapter in svelte.config.js under kit.adapter; SvelteKit 3 moved it into the sveltekit() plugin in vite.config.js, as shown here. The options are the same.
  • Node.js version: Set a NODE_VERSION environment variable, or add an .nvmrc file to the repository.

Stuck? The usual problems, solved

Questions

Before you start

Is Netlify free for this?

A free plan with usage limits. Paid plans for teams and higher limits.

How do I use my own domain?

Add it in Netlify's domain settings, then add the DNS records at your registrar. Our custom domain guides have the exact records for Netlify at each registrar.

The build works on my computer but fails here. Why?

Most often a different Node.js version, or a package that's installed on your computer but missing from package.json. Set a NODE_VERSION environment variable, or add an .nvmrc file to the repository.

Next step: connect your own domain to Netlify.

Rather skip git and build settings?

Build on your computer with npm run build, then drop the build folder (or a zip of it) on 99helpers. It's online at its own address in seconds, with no repository, workflow or base path to set up. Passwords, analytics, your own domain and AI editing are built in.

Drop your SvelteKit site on 99helpersSee the steps

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.