open-index/open-npm huggingface dataset:
npm package: @pori15/vercel
Description: domco Vercel adapter with Bun runtime support
Latest version: 4.0.0

# @domcojs/vercel

Vercel adapter for domco with Bun runtime support.

## Features

- **Bun Runtime**: Optimized for Bun's native Web APIs
- **Serverless Functions**: Deploy as Vercel serverless functions
- **ISR Support**: Incremental Static Regeneration
- **Image Optimization**: Built-in Vercel image optimization
- **Edge Functions**: Fast edge deployment

## Installation

```bash
npm install @domcojs/vercel
# or
bun add @domcojs/vercel
```

## Usage

```ts
import { adapter } from "@domcojs/vercel";
import { domco } from "domco";
import { defineConfig } from "vite";

export default defineConfig({
	plugins: [
		domco({
			adapter: adapter({
				config: {
					runtime: "bun", // Uses Bun runtime
					memory: 1024,
					maxDuration: 10,
				},
			}),
		}),
	],
});
```

## Configuration

### Basic Configuration

```ts
adapter({
	config: {
		runtime: "bun", // Bun runtime
		memory: 512, // Memory in MB
		maxDuration: 5, // Max duration in seconds
	},
});
```

### With ISR (Incremental Static Regeneration)

```ts
adapter({
	config: {
		runtime: "bun",
	},
	isr: {
		expiration: 60, // Revalidate every 60 seconds
	},
});
```

### With Image Optimization

```ts
adapter({
	config: {
		runtime: "bun",
	},
	images: {
		sizes: [640, 750, 828, 1080, 1200],
		domains: ["example.com"],
	},
});
```

## Deployment

1. Build your application:
   ```bash
   bun run build
   ```

2. Deploy to Vercel:
   ```bash
   vercel deploy
   ```

The adapter will create a `.vercel/output` directory with the optimized Bun runtime build.

## Bun Runtime Benefits

- **Native Web APIs**: Direct support for fetch, Request, Response
- **Faster Cold Starts**: Optimized JavaScript engine
- **Better Performance**: Native TypeScript support
- **Smaller Bundle Size**: Efficient bundling and tree-shaking