Skip to content

Nextjs

Source: src/Prisma/Website/Nextjs.ts

Next.js on Prisma Compute using next build and the existing Node custom-server target, not OpenNext. The artifact contains .next, public, configuration, and traced runtime dependencies, preserving installed package versions.

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.Nextjs("Web", {
rootDir: "./app",
});
const site = yield* Prisma.Website.Nextjs("Web", {
project,
domain: "www.example.com",
env: { API_BASE: "https://api.example.com" },
compute: { destroyOldDeployment: true },
});