SvelteKit
Source:
src/AWS/Website/SvelteKit.ts
Deploy a SvelteKit application to AWS: kit’s SSR server on a streaming Lambda Function URL, static assets (prerendered pages included) in S3, and a CloudFront distribution whose edge router serves uploaded files from S3 and forwards everything else to the server.
The build runs through @alchemy.run/frontend-frameworks/sveltekit with the
@alchemy.run/frontend-frameworks/sveltekit/aws deploy target (an in-memory
kit adapter emitting a streaming Lambda handler) — both must be
installed in your project.
Creating SvelteKit Sites
Section titled “Creating SvelteKit Sites”Basic SvelteKit App
const site = yield* AWS.Website.SvelteKit("Web", { rootDir: "./app",});Custom Domain
const site = yield* AWS.Website.SvelteKit("Web", { rootDir: "./app", domain: { name: "app.example.com", hostedZoneId: zone.hostedZoneId, },});Server Configuration
Section titled “Server Configuration”const site = yield* AWS.Website.SvelteKit("Web", { rootDir: "./app", server: { memorySize: 2048, environment: { API_BASE: api.url, }, },});