Svelte deployment

From spences10/skills · View interactive version

Svelte deployment is an AI agent skill from the GitHub repository spences10/skills. Svelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds.

How to use this skill

Skill file

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

Svelte packages

Streaming issues

Notes

<!--

PROGRESSIVE DISCLOSURE GUIDELINES:

-->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.