Configuration

Understand how ViteHub resolves shared config across features, providers, and local overrides.

ViteHub keeps configuration small and consistent. Start by registering the feature integration, then add the feature key in your config file only when one app-wide override is needed.

The shared precedence model is:

  1. Integration registration in plugins, modules, or Nitro modules enables the feature with defaults
  2. Global feature config under the top-level feature key in defineConfig, defineNitroConfig, or defineNuxtConfig
  3. Per-definition options inside defineX(..., options)

Queue, workflow, and sandbox share the same hosting defaults:

  1. Explicit provider when you want to override the default provider
  2. Nitro hosting inference for Cloudflare, Vercel, and Netlify-capable features
  3. Local feature defaults such as memory, openworkflow, or local

@vitehub/db keeps all public database config under top-level db:

  1. Top-level db
  2. Nested db.drizzle or db.default.drizzle for Drizzle-specific options

Example:

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@vitehub/db/nuxt'],
  db: {
    connector: 'libsql',
    options: {
      url: 'file:.data/db/app.sqlite',
    },
    drizzle: {
      schemaPaths: ['server/db/schema.ts'],
    },
  },
})
Keep connector, transport, and Drizzle ergonomics together under db.
The top-level feature key stays the same across Vite, Nitro, and Nuxt when you need customization. Only the registration entrypoint changes.