skills/vercel-cli/references/bun.md
Vercel supports Bun as a runtime. To enable it, add "bunVersion": "1.x" to your vercel.json:
{
"bunVersion": "1.x"
}
That's it. Vercel will use Bun instead of Node.js to run your project.
This works with any framework — backend apps (Express, Hono, Elysia), frontend frameworks, or anything else. Bun is used as the runtime, so Bun-specific APIs and features are available.
Elysia is a Bun-native framework. To use it on Vercel:
vercel.json:
{
"bunVersion": "1.x"
}
package.json:
{
"type": "module",
"dependencies": {
"elysia": "^1.0.0"
}
}
server.ts:
import { Elysia } from 'elysia';
const app = new Elysia().get('/', () => 'Hello Elysia!');
export default app;
vercel.json:
{
"bunVersion": "1.x"
}
package.json:
{
"scripts": {
"dev": "bun run --bun next dev",
"build": "bun run --bun next build"
}
}
bunVersion in vercel.json: Without it, your project runs on Node.js. Bun-specific APIs (like Bun.file()) will fail at runtime.