BuntalConfig
Configuration type for Buntal applications that defines build and runtime settings.
Source
Type Definition
type BuntalConfig = {
env?: 'development' | 'production'
appDir?: string
outDir?: string
staticDir?: string
config?: Partial<Bun.BuildConfig>
serverOptions?: Partial<Bun.Serve.Options<any>>
middlewares?: AtomicHandler[]
}Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
env | 'development' | 'production' | ❌ | development | Environment mode for build optimization |
appDir | string | ❌ | ./app | Directory containing application routes and pages |
outDir | string | ❌ | .buntal | Build output directory for compiled assets |
staticDir | string | ❌ | ./public | Directory containing static assets |
config | Partial<Bun.BuildConfig> | ❌ | {} | Additional Bun build configuration options |
serverOptions | Partial<Bun.Serve.Options<any>> | ❌ | - | Options passed through to Bun.serve |
middlewares | AtomicHandler[] | ❌ | [] | Middlewares run before every page, $ loader and API route (e.g. auth, cors, secureHeaders). Static assets are served before them. |
Last modified: 2026-10-02