Vike Local Development Guide
Vike (formerly vite-plugin-ssr) provides SSR and flexible rendering modes for Vite, commonly accessed at localhost:3000 during local development.
Vike (formerly vite-plugin-ssr) is a framework for building SSR applications on top of Vite, supporting various rendering modes such as SPA, SSR, and SSG, and can be integrated with view layers like React, Vue, and Solid.
Quick Start
npm create vike@latest
cd my-app
npm install
npm run devDefault localhost Access
| Purpose | Address |
|---|---|
| Development Server | http://localhost:3000 |
Some templates may use port 5173; refer to the project’s package.json and terminal output for confirmation.
Features
- Configurable Rendering Modes: Choose between SSR or CSR based on routing within the same project.
- Vite-based: Development and build toolchain consistent with the Vite ecosystem.
- Framework-agnostic: High decoupling of page logic from UI frameworks.
Common Commands
| Command | Description |
|---|---|
npm run dev | Development mode |
npm run build | Build client and server bundles |
npm run preview | Preview production build |
Comparison with Next.js / SvelteKit
Vike leans towards “Vite + composable SSR layer,” offering higher flexibility, making it suitable for teams gradually introducing SSR into existing Vite projects or requiring fine-grained control over rendering strategies.
Summary
Vike is suitable for implementing SSR/SSG on Vite, with local development typically accessed at http://localhost:3000, subject to project configuration.