Skip to content

Guide · Open source

How to use SvelteKit: install, build and deploy a site

Updated · written with AI from the project's own documentation and checked against our catalogue data

SvelteKit is an open-source framework built on top of Svelte, a JavaScript UI library. It provides structure for full websites and web applications, including routing and the build setup. This guide shows you where to start, which packages matter and how to decide whether SvelteKit fits your project.

SvelteKitsveltejs/kit · ★ 20.9k · MIT

Quick start

  1. 1Read the official documentation. Open svelte.dev/docs/kit to learn how to start a SvelteKit project. The README defers setup details to this page.
  2. 2Confirm Node.js is installed. SvelteKit requires Node.js according to the source. Install it before continuing.
  3. 3Clone the repository. Run git clone https://github.com/sveltejs/kit to get the source code locally.
  4. 4Pick a deployment adapter. Choose the adapter that matches your host, such as adapter-node, adapter-static, adapter-vercel, adapter-netlify or adapter-cloudflare.
  5. 5Reproduce bugs in a minimal project. If you hit a problem, create a minimal Vite project with npm create vite@latest and check whether the issue appears there.
  6. 6Report issues to the right tracker. Send Vite-originated problems to the Vite issue tracker and SvelteKit problems to the SvelteKit repository.

What SvelteKit is and who it is for

SvelteKit adds structure on top of Svelte so you can build full websites and web applications. It handles things like routing and the build setup, so you do not have to assemble those parts yourself.

The project is aimed at developers who already use or want to use Svelte, at teams that want an MIT-licensed, community-maintained framework, and at projects that need to deploy to different hosting targets. The framework assumes web development experience, so it is not a first step for someone who has never written JavaScript.

  • Good fit: full websites and web apps built with Svelte
  • Good fit: teams that want an MIT-licensed framework
  • Less suited: people new to JavaScript, or projects that need only a simple static page

What you need before you start

The source lists Node.js as the prerequisite. The README does not give a required Node.js version, so check the official documentation for current requirements before installing.

The README is brief and points to the official documentation at svelte.dev/docs/kit for details on how to get started.

  • Node.js installed on your machine
  • Basic familiarity with JavaScript and web development

Get the SvelteKit source code

The README's install command clones the repository. This is the route to take if you want to read or work on the framework source itself. Run the command in a terminal where you keep your projects.

The README also points to CONTRIBUTING.md for information on how to develop SvelteKit locally.

git clone https://github.com/sveltejs/kit

Choose the right package and adapter

The repository contains several packages. The core is @sveltejs/kit. Adapters prepare your app for a hosting target. The README lists adapters for auto detection, Cloudflare, Netlify, Node, static sites and Vercel, along with the enhanced-img and package packages.

Additional adapters for other hosts are maintained by the community and listed on the Svelte Society website.

  • @sveltejs/kit: the core framework
  • @sveltejs/adapter-auto, adapter-cloudflare, adapter-netlify, adapter-node, adapter-static, adapter-vercel: deployment targets
  • @sveltejs/enhanced-img: image handling
  • @sveltejs/package: packaging

Find help and report bugs correctly

Many build problems come from Vite, the build tool SvelteKit uses. Before reporting a bug in SvelteKit, check whether the issue is really in SvelteKit. The README suggests creating a minimal Vite project to reproduce client-side issues, or a second template for SSR or library repros.

If the issue originates from Vite, report it in the Vite issue tracker rather than the SvelteKit one. For questions beyond the README, the project links to a Discord chat.

  • Client-side only repro: npm create vite@latest
  • SSR or library repro: npm create vite-extra@latest
  • Vite issues go to the Vite issue tracker
npm create vite@latest

What people use it for

  • Building a full website with routing and a build setup handled by the framework
  • Building a web application in Svelte that must deploy to a specific host through an adapter
  • Maintaining an MIT-licensed codebase that a team can fork and modify
  • Contributing fixes or features by developing SvelteKit locally from the cloned repository

Frequently asked questions

Is SvelteKit free to use?

SvelteKit is MIT licensed, according to the README's license section. The MIT licence permits use under its terms, and the README links to the full LICENSE file in the repository.

What do I need to install SvelteKit?

The source lists Node.js as the prerequisite. The README does not list other requirements, so check the official documentation at svelte.dev/docs/kit for the current setup steps.

How do I install SvelteKit?

The README's install command is git clone https://github.com/sveltejs/kit, which gets the source code. For starting a project, the README points to the official documentation.

Is SvelteKit good for a simple static page?

The source says a lighter tool may be enough for a simple static page. The README does not compare SvelteKit with alternatives, so judge that for your own project.

What are the alternatives to SvelteKit?

Comparable projects include Next.js, Nuxt, SolidStart and Astro. The source names them but does not compare their features, so review each one against your needs.

Why did my SvelteKit build fail?

Many build issues come from Vite, which SvelteKit uses for building. Reproduce the problem in a minimal Vite project, and if it appears there, report it to the Vite issue tracker.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

SvelteKit suits developers who already know Svelte or JavaScript and want an MIT-licensed framework for full sites or apps with flexible deployment through adapters. Beginners or anyone who only needs a simple static page may be better served by a lighter tool.

Install options & downloads