svelte-deployment

spences10's avatarfrom spences10

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

⭐107stars🔀8forks📁View on GitHub🕐Updated Jan 1, 2026

When & Why to Use This Skill

This Claude skill provides expert guidance for Svelte deployment and production optimization. It offers actionable configurations for SvelteKit adapters (Static, Node, Cloudflare), Vite 7 integration, and pnpm 10 setups. Designed to streamline the DevOps workflow, it covers essential practices for library authoring, PWA implementation, and resolving environment-specific issues like Cloudflare streaming limitations.

Use Cases

  • Deploying SvelteKit applications to diverse environments including Cloudflare Pages, Node.js servers, or static hosting using optimized adapters.
  • Upgrading development toolchains to Vite 7 and pnpm 10, ensuring correct synchronization scripts and dependency management.
  • Implementing Progressive Web App (PWA) features with Workbox for offline-first web experiences.
  • Configuring Svelte library projects for publication, including proper peerDependency management and keyword optimization for npm.
  • Troubleshooting production build issues such as chunked transfer encoding errors on edge platforms.
namesvelte-deployment
# IMPORTANTKeep description on ONE line for Claude Code compatibility
descriptionSvelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds.

Svelte Deployment

Quick Start

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

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

Vite 7: Update both packages together:

pnpm add -D vite@7 @sveltejs/vite-plugin-svelte@6

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'
  • Last verified: 2025-01-14