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
Section titled “Install”Install the build integration in your project; the resource loads its
/nuxt and /nuxt/node exports:
bun add -d @alchemy.run/frontend-frameworks @vercel/nftnpm install -D @alchemy.run/frontend-frameworks @vercel/nftpnpm add -D @alchemy.run/frontend-frameworks @vercel/nftyarn add -D @alchemy.run/frontend-frameworks @vercel/nftConfigure Nuxt
Section titled “Configure Nuxt”Your nuxt.config.ts loads natively, including modules and layers:
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.
Declare the Website
Section titled “Declare the Website”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.
Add it to the Stack
Section titled “Add it to the Stack”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.
Add environment variables
Section titled “Add environment variables”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.
Read the environment in server code
Section titled “Read the environment in server code”export default defineEventHandler(() => ({ greeting: process.env.GREETING ?? "hello",}));Server routes and SSR run on Bun and can read process.env.
Prerendering
Section titled “Prerendering”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.
Local dev
Section titled “Local dev”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.
Custom domain
Section titled “Custom domain”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.
Where next
Section titled “Where next”- Nuxt API.
- Nuxt example.
- Websites, Compute apps, and Setup.