1import * as Alchemy from "alchemy";
2import * as Cloudflare from "alchemy/Cloudflare";
3import * as Effect from "effect/Effect";
4
5export default Alchemy.Stack(
6 "CloudflareWebsiteFoldkitExample",
7 {
8 providers: Cloudflare.providers(),
9 state: Cloudflare.state(),
10 },
11 Effect.gen(function* () {
12 const site = yield* Cloudflare.Website.Foldkit("Foldkit", {
13 // Only hash the files that affect the build, so unchanged sources
14 // skip the Vite build (and the deploy) entirely.
15 memo: {
16 include: ["src/**", "index.html", "package.json", "vite.config.ts"],
17 },
18 });
19
20 return {
21 url: site.url,
22 };
23 }),
24);