1# AWS Website: Vite
2
3Deploys a [Vite](https://vite.dev) React SPA to AWS with
4`AWS.Website.Vite` — static assets (the `vite build` output) in S3
5behind a CloudFront distribution. No server function is created; the
6page renders entirely in the browser.
7
8- `src/main.tsx` mounts the React app into `index.html`.
9- Tailwind CSS v4 is wired through `@tailwindcss/vite` in the project's
10 own `vite.config.ts`, which Alchemy loads natively — plugins included.
11- `spa` defaults on, so unmatched paths answer with the index page.
12
13The integration package must be installed in the project (it is loaded
14dynamically at deploy time):
15
16```sh
17bun add -d @alchemy.run/frontend-frameworks
18```
19
20## Deploy
21
22```sh
23bun install
24bun run deploy
25```
26
27Unchanged sources skip the Vite build entirely on subsequent deploys —
28the input files are content-hashed (scoped by `memo.include`).
29
30## Local development
31
32```sh
33bun run dev
34```
35
36`alchemy dev` runs Vite's own dev server (HMR included) — no cloud
37resources are created.
38
39## Destroy
40
41```sh
42bun run destroy
43```