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:
- Integration registration in
plugins,modules, or Nitro modules enables the feature with defaults - Global feature config under the top-level feature key in
defineConfig,defineNitroConfig, ordefineNuxtConfig - Per-definition options inside
defineX(..., options)
Queue, workflow, and sandbox share the same hosting defaults:
- Explicit
providerwhen you want to override the default provider - Nitro hosting inference for Cloudflare, Vercel, and Netlify-capable features
- Local feature defaults such as
memory,openworkflow, orlocal
@vitehub/db keeps all public database config under top-level db:
- Top-level
db - Nested
db.drizzleordb.default.drizzlefor 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.