Skip to content

SvelteKit

Source: src/Prisma/Website/SvelteKit.ts

SvelteKit SSR and prerendered assets on Prisma Compute. The Node target injects the adapter. For Kit v3, pass configuration through kit rather than a svelte.config.js file.

Native framework development and HMR run without Prisma cloud resources. Apply Alchemy.remote() to use the live Compute deployment during dev. Packaging requires the optional @vercel/nft peer dependency.

const site = yield* Prisma.Website.SvelteKit("Web", {
rootDir: "./app",
});
const site = yield* Prisma.Website.SvelteKit("Web", {
project,
domain: "www.example.com",
env: { API_BASE: "https://api.example.com" },
compute: { destroyOldDeployment: true },
});