ViteHub is still experimental. Expect bugs and breaking changes.

Vite integrations and Provider Output

Understand how ViteHub prepares a package for development and deployment.

A Vite integration connects a package to Vite development and builds. Provider Output is what that integration generates for a host, such as routes, functions, bindings, workers, crons, or runtime files.

Configure the integration in Vite. Inspect Provider Output when you need to check host wiring. Application code uses the package's documented server API instead of generated internals.

Configure the integration

vite.config.ts
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'

export default defineConfig({
  plugins: [
    vitehub({ preset: 'node', agent: true, kv: true }),
  ],
})

Put options in vite.config.ts when they affect discovery, generated files, provider bindings, or deployment. Put options in a Definition when they apply to that named item.

Use Provider Output as build evidence

Inspect generated output to verify routes, bindings, or host wiring. Import it from application code only when the package documents a path such as #vitehub/env/server.

NeedSurface
Development and build wiringThe package Vite Integration.
One named declarationA Definition file.
Host deployment materialProvider Output generated by the integration.
Server code accessA documented package or generated import.

Read Definition discovery, Runtime Helpers and stable imports, and Provider Output for more detail.