Integrations
Generate with Vite
Run Kubb code generation during Vite builds.
This integration generates during builds only. Run
kubb generate before starting the development server.Install Kubb and your output plugins
Follow the installation guide to add Kubb and the plugins your output needs. The integration ships with kubb as unplugin-kubb.
Configure the integration
Import your shared kubb.config.ts and pass it to the integration. The config must be a single object, not the array or function forms defineConfig accepts. Run the build command of your tool to generate the files.
vite.config.ts
import kubb from 'kubb/vite'
import { defineConfig } from 'vite'
import config from './kubb.config'
export default defineConfig({
plugins: [kubb({ config })],
})Bundler integrations apply fewer defaults than the CLI: no Markdown parser, no reporters, and no
output.postGenerate commands. Use the CLI when you need them. See Defaults.See also
- Build tools for every supported bundler
- Configuration