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