Documentation
Get started with this SvelteKit PWA Boilerplate
Quick setup guide for development
Prerequisites
- • Node.js 22 (use
fnm use 22
) - • pnpm package manager
- • Git for version control
Installation
Commands for development and deployment
pnpm dev
DevelopmentStart development server with HMR
pnpm build
ProductionBuild optimized production bundle
pnpm preview
PreviewPreview production build locally
pnpm test
TestingRun all tests (unit + E2E)
pnpm lint
QualityLint code with ESLint
pnpm check
TypeScriptCheck TypeScript types
Understanding the codebase organization
Progressive Web App features and setup
Service Worker
The service worker is implemented using SvelteKit's native service worker support. It handles caching, offline functionality, and automatic updates without the need for additional plugins like VitePWA.
Manifest & Icons
Generate PWA icons from your favicon.svg using the command:
pnpm run icons:generate
Update Strategy
The app automatically checks for updates and prompts users when new versions are available. Updates are applied seamlessly without requiring a page reload.
Deploy your PWA to production
Vercel (Recommended)
This project is optimized for Vercel deployment with zero configuration. Simply connect your repository to Vercel and deploy.
Other Platforms
For other deployment platforms, you may need to adjust the adapter
in svelte.config.js
and ensure
service worker paths are correctly configured.