Cloudflare Vite Example
This example shows how to deploy a Vite application to Cloudflare Workers with KV Namespace bindings and environment variables.Features
- Vite: Modern frontend build tool with HMR
- KV Namespace: Key-value storage for the application
- Environment Bindings: Secrets and configuration
- Local Development: Vite dev server integration
Project Setup
Key Features Explained
KV Namespace Adoption
Theadopt: true flag allows reusing existing KV namespaces:
Environment Variables
Secrets and configuration are passed via bindings:Local Development
Thedev configuration integrates with Vite’s dev server: