svelte-deployment
Svelte部署指南。用于适配器、Vite配置、pnpm设置、库编写、PWA或生产构建。
📖 中文导读:Svelte部署指南。用于适配器、Vite配置、pnpm设置、库编写、PWA或生产构建。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: svelte-deployment
IMPORTANT: Keep description on ONE line for Claude Code compatibility
prettier-ignore
description: Svelte 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
- 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' - Last verified: 2025-01-14