SvelteKit Local Development Guide
SvelteKit is the full-stack framework for Svelte, supporting SSR and static exports, with local development defaulting to localhost:5173.
SvelteKit is the official application framework for Svelte, providing file routing, server-side loading, adapter deployment, and an excellent development experience, with compile-time optimizations resulting in a smaller runtime size.
Quick Start
npm create svelte@latest my-app
cd my-app
npm install
npm run devDefault localhost Access
| Purpose | Address |
|---|---|
| Development Server | http://localhost:5173 |
| Preview Production Build | http://localhost:4173 |
Common Commands
| Command | Description |
|---|---|
npm run dev | Development mode |
npm run build | Production build |
npm run preview | Preview build results |
Rendering Modes
- SSR: Supported by default, beneficial for SEO
- SSG: Pre-rendered static pages
- CSR: Configurable pure client-side pages
Choose deployment targets through adapter-static, adapter-node, adapter-cloudflare, etc.
Summary
SvelteKit is suitable for full-stack projects that prioritize performance and concise syntax; local development can be accessed at http://localhost:5173.