Skip to content

Commit

Permalink
dev: ensure static site starts by default
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Jul 24, 2024
1 parent d312185 commit 28b77ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
12 changes: 0 additions & 12 deletions examples/aws-monorepo/infra/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,3 @@ export const astro = new sst.aws.Astro("Astro", {
VITE_API_URL: api.url,
},
});

export const astro2 = new sst.aws.Astro("Astro2", {
path: "packages/astro",
link: [bucket],
environment: {
VITE_API_URL: api.url,
FOO: "1",
},
dev: {
autostart: false,
},
});
4 changes: 0 additions & 4 deletions examples/aws-monorepo/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ declare module "sst" {
type: "sst.aws.Astro"
url: string
}
Astro2: {
type: "sst.aws.Astro"
url: string
}
Database: {
name: string
type: "sst.aws.Dynamo"
Expand Down
11 changes: 8 additions & 3 deletions platform/src/components/aws/static-site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,14 @@ export class StaticSite extends Component implements Link.Linkable {
}),
),
_dev: {
directory: sitePath,
environment,
command: "npm run dev",
environment: environment,
command: output(args.dev?.command).apply(
(val) => val || "npm run dev",
),
directory: output(args.dev?.directory).apply(
(dir) => dir || sitePath,
),
autostart: output(args.dev?.autostart).apply((val) => val ?? true),
},
});
return;
Expand Down

0 comments on commit 28b77ed

Please sign in to comment.