touch .env
.env
: 共通
VITE_API_URL="https://****/" -- 本番環境のURLを
.env.local
: pnpm run dev 時
VITE_API_URL="http://localhost:5173/"
.env.preview
: pnpm run preview 時
VITE_API_URL="http://localhost:8788/"
Run the dev server:
pnpm run dev
To run Wrangler:
pnpm run preview
Generate types for your Cloudflare bindings in wrangler.toml
:
pnpm run typegen
You will need to rerun typegen whenever you make changes to wrangler.toml
.
First, build your app for production:
pnpm run build
Then, deploy your app to Cloudflare Pages:
pnpm run deploy
This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever css framework you prefer. See the Vite docs on css for more information.