BuntalConfig

Configuration type for Buntal applications that defines build and runtime settings.

Source

View source on GitHub

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

PropertyTypeRequiredDefaultDescription
env'development' | 'production'❌developmentEnvironment mode for build optimization
appDirstring❌./appDirectory containing application routes and pages
outDirstring❌.buntalBuild output directory for compiled assets
staticDirstring❌./publicDirectory containing static assets
configPartial<Bun.BuildConfig>❌{}Additional Bun build configuration options
serverOptionsPartial<Bun.Serve.Options<any>>❌-Options passed through to Bun.serve
middlewaresAtomicHandler[]❌[]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