Skip to content

Nuxt

Prisma.Website.Nuxt builds Nuxt through your project’s @nuxt/kit with Nitro’s Node target. The server, client assets, and prerendered pages are uploaded as tar.gz and run on Bun in Prisma Compute. No Docker image or registry is involved.

Install the build integration in your project; the resource loads its /nuxt and /nuxt/node exports:

Terminal window
bun add -d @alchemy.run/frontend-frameworks @vercel/nft

Your nuxt.config.ts loads natively, including modules and layers:

nuxt.config.ts
export default defineNuxtConfig({
modules: ["@nuxtjs/tailwindcss"],
routeRules: { "/about": { prerender: true } },
});

Don’t set nitro.preset. The shared Node target owns the preset and rejects foreign presets. That build target still runs on Bun on Prisma.

alchemy.run.ts
import * as Prisma from "alchemy/Prisma";
export const Website = Prisma.Website.Nuxt("Website");

rootDir defaults to ".". Omit project to create a database-less Prisma project on live deploy, or pass a project already in your Stack.

alchemy.run.ts
import * as Alchemy from "alchemy";
import * as Effect from "effect/Effect";
export default Alchemy.Stack(
"MyNuxtSite",
{ providers: Prisma.providers(), state: Alchemy.localState() },
Effect.gen(function* () {
const site = yield* Website;
return { url: site.url };
}),
);

site.url is the Compute endpoint on deploy and Nuxt’s local URL in dev.

export const Website = Prisma.Website.Nuxt("Website", {
env: {
GREETING: "Hello from Alchemy!",
NUXT_PUBLIC_API_BASE: "https://api.example.com",
},
});

The environment is set before build and dev, and passed to Compute. Matching NUXT_* keys override declared runtimeConfig values using Nuxt’s normal conventions. Public runtime config is visible to the browser; do not put secrets there.

server/api/hello.ts
export default defineEventHandler(() => ({
greeting: process.env.GREETING ?? "hello",
}));

Server routes and SSR run on Bun and can read process.env.

Override native config with the nuxt bag:

export const Website = Prisma.Website.Nuxt("Website", {
nuxt: {
routeRules: { "/about": { prerender: true } },
},
});

Prerendered pages land in .output/public and are served as files before the Nitro handler. They remain part of the Compute deployment, not a separate CDN publication. Use prerender for build-time static routes and Nitro cache rules for runtime caching; provider-specific ISR behavior from Vercel or Netlify does not carry over to this target.

bun alchemy dev starts Nuxt’s native server with HMR and creates no Prisma resources for the Website. Use .pipe(Alchemy.remote()) to opt into the live deployment during dev.

export const Website = Prisma.Website.Nuxt("Website", {
domain: "app.example.com",
});

Prisma.CustomDomain requires the project’s current default branch. Configure its returned DNS records yourself and check provisioning status before cutover. See Custom domains.