React (Vite)
Deploy a Vite + React app to Creek.
Quick Start
npm create vite@latest my-app -- --template react-ts
cd my-app
npm install
npx creek deployCreek auto-detects Vite + React and deploys to a sandbox preview.
How It Works
- Detection — Creek reads
package.jsonand findsreact+vitedependencies - Build — Runs
npm run build(Vite outputs todist/) - Upload — Collects all files from
dist/and uploads to Cloudflare's edge - Deploy — Creates a Worker with SPA fallback routing
Configuration
No configuration needed for standard Vite + React setups. Creek uses these defaults:
| Setting | Value |
|---|---|
| Build command | npm run build |
| Output directory | dist |
| Render mode | SPA |
| SPA fallback | index.html served for all non-file routes |
Override in creek.toml if needed:
[project]
name = "my-react-app"
[build]
command = "npm run build"
output = "dist"What Gets Deployed
All files in dist/:
index.html— entry point + SPA fallbackassets/*.js— hashed JavaScript bundlesassets/*.css— hashed CSS bundles- Static assets (images, fonts, etc.)
SPA Routing
Creek serves index.html for any path that doesn't match a file. This means React Router, TanStack Router, and other client-side routers work out of the box.
/about→ servesindex.html(200)/assets/index-abc123.js→ serves the JS file (200)/favicon.ico→ serves the file (200)