1import * as Alchemy from "alchemy";
2import * as Fly from "alchemy/Fly";
3import * as Effect from "effect/Effect";
4
5export default Alchemy.Stack(
6 "FlyWebsiteNuxtExample",
7 {
8 providers: Fly.providers(),
9 state: Alchemy.localState(),
10 },
11 Effect.gen(function* () {
12 const site = yield* Fly.Website.Nuxt("NuxtSite", {
13 // Only hash the files that affect the build, so unchanged sources
14 // skip the Nuxt build (and the deploy) entirely.
15 memo: {
16 include: [
17 "app/**",
18 "server/**",
19 "public/**",
20 "package.json",
21 "nuxt.config.ts",
22 "tsconfig.json",
23 ],
24 },
25 env: {
26 GREETING: "Hello from Nuxt on Fly!",
27 },
28 });
29
30 return {
31 url: site.url,
32 };
33 }),
34);