new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Bun · all subjects

deployment/vercel

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Vercel deployment: configure Bun runtime in vercel.json

To enable the Bun runtime for Vercel Functions, add a bunVersion field to your vercel.json file. The value must be "1.x"; Vercel handles the minor version internally. Vercel automatically detects this configuration and runs your application on Bun. For best results, match your local Bun version with the version used by Vercel.

Vercel Next.js with Bun: update package.json scripts

When deploying a Next.js project on Vercel with Bun (including ISR), update your package.json scripts to use the Bun runtime: set "dev" script to "bun --bun next dev" and "build" script to "bun --bun next build". The --bun flag runs the Next.js CLI under Bun. Bundling with Turbopack or Webpack is unchanged. Both local development and builds will use Bun with these scripts.

Vercel Bun deployment CLI commands

Deploy to Vercel using bunx (no global install): bunx vercel login and bunx vercel deploy. Alternatively, install the Vercel CLI globally with bun i -g vercel, then use vercel login and vercel deploy.

Vercel: verify Bun runtime is active

To confirm your Vercel deployment uses Bun, log the Bun version with: console.log("runtime", process.versions.bun);

Bun.serve is not supported on Vercel Functions

Bun.serve() is not supported on Vercel Functions. Use Bun with frameworks supported by Vercel, such as Next.js, Express, Hono, or Nitro.

Vercel Bun runtime: Beta status and limitations

The Bun runtime on Vercel is in Beta. Some features are not yet supported, including automatic source maps, byte-code caching, and metrics on node:http/https.

Vercel Routing Middleware with Bun

To run Vercel Routing Middleware with Bun, set the runtime to "nodejs" in the middleware configuration: export const config = { runtime: "nodejs" };

Vercel Fluid compute supports both Bun and Node.js runtimes

Both Bun and Node.js runtimes run on Vercel's Fluid compute and support the same core Vercel Functions features.

Give your agent this brain