svelte-deployment

star 11

Svelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds.

spences10 By spences10 schedule Updated 6/8/2026

name: svelte-deployment

IMPORTANT: Keep description on ONE line for agent compatibility

prettier-ignore

description: "Svelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds." metadata: last_updated: "2026-06-08" verified_against: "Svelte 5/Kit docs, sveltejs/kit#15934, SvelteKit Vite-plugin config post"

Svelte Deployment

Quick Start

SvelteKit config: Prefer putting Kit options in vite.config.ts via sveltekit({ ... }). svelte.config.js is optional in Kit 2 and will not be read by Kit 3.

pnpm 10+: Add prepare script (postinstall disabled by default):

{
    "scripts": {
        "prepare": "svelte-kit sync"
    }
}

Vite config example:

// vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import adapter from '@sveltejs/adapter-vercel';
import { defineConfig } from 'vite';

export default defineConfig({
    plugins: [
        sveltekit({
            adapter: adapter(),
            compilerOptions: { experimental: { async: true } },
            experimental: { remoteFunctions: true }
        })
    ]
});

Adapters

# Static site
pnpm add -D @sveltejs/adapter-static

# Node server
pnpm add -D @sveltejs/adapter-node

# Cloudflare
pnpm add -D @sveltejs/adapter-cloudflare

Reference Files

Notes

  • Cloudflare may strip Transfer-Encoding: chunked (breaks streaming)
  • Library authors: include svelte in keywords AND peerDependencies
  • Single-file bundle: kit.output.bundleStrategy: 'single'
  • VS Code/svelte-check/SvelteKit can read Kit config from the Vite plugin via @sveltejs/load-config.
  • Last verified: 2026-06-08
Install via CLI
npx skills add https://github.com/spences10/skills --skill svelte-deployment
Repository Details
star Stars 11
call_split Forks 1
navigation Branch main
article Path SKILL.md
More from Creator