Qwik Local Development Guide
Build Resumable Web applications with Qwik, developed on localhost:5173, optimizing first screen load and interaction latency.
Qwik is a performance-focused web framework that employs a “Resumable” architecture: after server-side rendering HTML, it loads the corresponding JavaScript on demand only during user interactions, significantly reducing the initial JS size and Time to Interactive (TTI).
Quick Start
npm create qwik@latest
cd my-qwik-app
npm install
npm run devDefault localhost Access
| Purpose | Address |
|---|---|
| Development Server | http://localhost:5173 |
| Preview Production Build | http://localhost:4173 (npm run preview) |
You can modify server.port in vite.config.ts.
Common Commands
| Command | Description |
|---|---|
npm run dev | Start the Vite development server |
npm run build | Production build |
npm run preview | Preview build results |
npm run qwik add | Add integrations (React, Partytown, etc.) |
Core Concepts
$Suffix: Marks lazy-loadable boundaries (components, events, states)- Qwik City: Built-in file routing, SSR, layouts, and data loading
- Deep integration with Vite, providing a development experience similar to modern React/Vue projects
Use Cases
- Marketing pages and applications with high demands on Core Web Vitals
- Scenarios requiring SSR while wanting client-side JS to load on demand
Summary
Qwik local development defaults to http://localhost:5173, suitable for modern web applications that prioritize exceptional loading performance.