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