1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91# React + Vite + Hono + Cloudflare Workers
[](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/main/vite-react-template)
This template provides a minimal setup for building a React application with TypeScript and Vite, designed to run on Cloudflare Workers. It features hot module replacement, ESLint integration, and the flexibility of Workers deployments.

<!-- dash-content-start -->
๐ Supercharge your web development with this powerful stack:
- [**React**](https://react.dev/) - A modern UI library for building interactive interfaces
- [**Vite**](https://vite.dev/) - Lightning-fast build tooling and development server
- [**Hono**](https://hono.dev/) - Ultralight, modern backend framework
- [**Cloudflare Workers**](https://developers.cloudflare.com/workers/) - Edge computing platform for global deployment
### โจ Key Features
- ๐ฅ Hot Module Replacement (HMR) for rapid development
- ๐ฆ TypeScript support out of the box
- ๐ ๏ธ ESLint configuration included
- โก Zero-config deployment to Cloudflare's global network
- ๐ฏ API routes with Hono's elegant routing
- ๐ Full-stack development setup
- ๐ Built-in Observability to monitor your Worker
Get started in minutes with local development or deploy directly via the Cloudflare dashboard. Perfect for building modern, performant web applications at the edge.
<!-- dash-content-end -->
## Getting Started
To start a new project with this template, run:
```bash
npm create cloudflare@latest -- --template=cloudflare/templates/vite-react-template
```
A live deployment of this template is available at:
[https://react-vite-template.templates.workers.dev](https://react-vite-template.templates.workers.dev)
## Development
Install dependencies:
```bash
npm install
```
Start the development server with:
```bash
npm run dev
```
Your application will be available at [http://localhost:5173](http://localhost:5173).
## Production
Build your project for production:
```bash
npm run build
```
Preview your build locally:
```bash
npm run preview
```
Deploy your project to Cloudflare Workers:
```bash
npm run build && npm run deploy
```
Monitor your workers:
```bash
npx wrangler tail
```
## Additional Resources
- [Cloudflare Workers Documentation](https://developers.cloudflare.com/workers/)
- [Vite Documentation](https://vitejs.dev/guide/)
- [React Documentation](https://reactjs.org/)
- [Hono Documentation](https://hono.dev/)