This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.
npm install
npx wrangler login # one-time
npm run deploy # vite build + wrangler deploy
npm run cf:dev # serve the production build locally on the Workers runtimeConfig lives in wrangler.jsonc. API hosts are in keyconfig.js.