@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 27 lines 863 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Alchemy from "alchemy";
3 import * as Effect from "effect/Effect";
4
5 export default Alchemy.Stack(
6 "CloudflareWebsiteViteExample",
7 {
8 providers: Cloudflare.providers(),
9 state: Cloudflare.state(),
10 },
11 Effect.gen(function* () {
12 // A plain Vite SPA: no `main` entry needed — Alchemy runs Vite with
13 // this project's own vite.config.ts, merging its Cloudflare
14 // integration on top, and deploys the client assets on a Worker.
15 const site = yield* Cloudflare.Website.Vite("Website", {
16 // Only hash the files that affect the build, so unchanged sources
17 // skip the Vite build (and the deploy) entirely.
18 memo: {
19 include: ["src/**", "index.html", "package.json", "vite.config.ts"],
20 },
21 });
22
23 return {
24 url: site.url,
25 };
26 }),
27 );