$npx -y skills add spences10/svelte-skills-kit --skill svelte-deploymentSvelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds.
| 1 | # Svelte Deployment |
| 2 | |
| 3 | ## Quick Start |
| 4 | |
| 5 | **pnpm 10+:** Add prepare script (postinstall disabled by default): |
| 6 | |
| 7 | ```json |
| 8 | { |
| 9 | "scripts": { |
| 10 | "prepare": "svelte-kit sync" |
| 11 | } |
| 12 | } |
| 13 | ``` |
| 14 | |
| 15 | **Vite 7:** Update both packages together: |
| 16 | |
| 17 | ```bash |
| 18 | pnpm add -D vite@7 @sveltejs/vite-plugin-svelte@6 |
| 19 | ``` |
| 20 | |
| 21 | ## Adapters |
| 22 | |
| 23 | ```bash |
| 24 | # Static site |
| 25 | pnpm add -D @sveltejs/adapter-static |
| 26 | |
| 27 | # Node server |
| 28 | pnpm add -D @sveltejs/adapter-node |
| 29 | |
| 30 | # Cloudflare |
| 31 | pnpm add -D @sveltejs/adapter-cloudflare |
| 32 | ``` |
| 33 | |
| 34 | ## Reference Files |
| 35 | |
| 36 | - [library-authoring.md](references/library-authoring.md) - Publishing |
| 37 | Svelte packages |
| 38 | - [pwa-setup.md](references/pwa-setup.md) - Offline-first with workbox |
| 39 | - [cloudflare-gotchas.md](references/cloudflare-gotchas.md) - |
| 40 | Streaming issues |
| 41 | |
| 42 | ## Notes |
| 43 | |
| 44 | - Cloudflare may strip `Transfer-Encoding: chunked` (breaks streaming) |
| 45 | - Library authors: include `svelte` in keywords AND peerDependencies |
| 46 | - Single-file bundle: `kit.output.bundleStrategy: 'single'` |
| 47 | - **Last verified:** 2025-01-14 |
| 48 | |
| 49 | <!-- |
| 50 | PROGRESSIVE DISCLOSURE GUIDELINES: |
| 51 | - Keep this file ~50 lines total (max ~150 lines) |
| 52 | - Use 1-2 code blocks only (recommend 1) |
| 53 | - Keep description <200 chars for Level 1 efficiency |
| 54 | - Move detailed docs to references/ for Level 3 loading |
| 55 | - This is Level 2 - quick reference ONLY, not a manual |
| 56 | --> |