About svelte-deployment
A deployment and configuration guidance skill for Svelte and SvelteKit projects, aimed at application developers and Svelte package authors. It covers adapter choices, Vite configuration, pnpm preparation scripts, and deployment notes such as streaming behavior.
Key features
- 01Show SvelteKit and Vite configuration examples
- 02Describe static, Node, and Cloudflare adapters
- 03Explain pnpm 10+ prepare script setup
- 04Note Cloudflare streaming issues
- 05Provide package publishing and PWA reference topics
Use cases
- 01Choose a deployment adapter for a SvelteKit project
- 02Configure a project using pnpm 10+
- 03Investigate streaming issues in Cloudflare deployments
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ spences10/ skills --skill svelte-deploymentAfter installing, type/svelte-deploymentin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/cloudflare-gotchas.mdlibrary-authoring.mdpwa-setup.mdDetails
From the project READMESvelte 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
- library-authoring.md - Publishing Svelte packages
- pwa-setup.md - Offline-first with workbox
- cloudflare-gotchas.md - Streaming issues
Notes
- Cloudflare may strip
Transfer-Encoding: chunked(breaks streaming) - Library authors: include
sveltein 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
Comments
Markdown supported