unplugin-kubb
| Install | |
|---|---|
npm install unplugin-kubb |
|
| Latest Version: | 5.11.6 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 21, 2026 |
| Links: | GitHub · npm |
unplugin-kubb
Universal build integration for Kubb
Integration of Kubb for Vite, webpack, Rollup, Rolldown, Rspack, esbuild, Farm, Nuxt, and Astro powered by unplugin.
Kubb generates once, when the first build starts. Watch rebuilds and later builds that share the plugin reuse that output, so restart the build after you change your spec. Vite, Nuxt, and Astro generate during builds only, not in their development servers. A missing config or a failed generation fails the build.
Installation
bun add -D unplugin-kubb @kubb/core
# or
pnpm add -D unplugin-kubb @kubb/core
# or
npm install -D unplugin-kubb @kubb/core
// vite.config.ts
import kubb from 'unplugin-kubb/vite'
import { defineConfig } from 'vite'
import config from './kubb.config'
export default defineConfig({
plugins: [kubb({ config })],
})
// rollup.config.ts, rolldown.config.ts
import kubb from 'unplugin-kubb/rollup' // or 'unplugin-kubb/rolldown'
import config from './kubb.config'
export default {
input: 'src/index.ts',
plugins: [kubb({ config })],
}
// webpack.config.ts, rspack.config.ts
import kubb from 'unplugin-kubb/webpack' // or 'unplugin-kubb/rspack'
import config from './kubb.config'
export default {
plugins: [kubb({ config })],
}
// build.ts
import { build } from 'esbuild'
import kubb from 'unplugin-kubb/esbuild'
import config from './kubb.config'
await build({
entryPoints: ['src/index.ts'],
bundle: true,
outfile: 'dist/bundle.js',
plugins: [kubb({ config })],
})
// farm.config.ts
import { defineConfig } from '@farmfe/core'
import kubb from 'unplugin-kubb/farm'
import config from './kubb.config'
export default defineConfig({
plugins: [kubb({ config })],
})
// nuxt.config.ts: works with the Vite, webpack, and Rspack builders
import config from './kubb.config'
export default defineNuxtConfig({
modules: [['unplugin-kubb/nuxt', { config }]],
})
// astro.config.mjs
import { defineConfig } from 'astro/config'
import kubb from 'unplugin-kubb/astro'
import config from './kubb.config'
export default defineConfig({
integrations: [kubb({ config })],
})
Options
config
Define the options for Kubb.
type Options = {
config: UserConfig
}
Supporting Kubb
Kubb is an open source project, and its development is funded entirely by sponsors. If you would like to become a sponsor, please consider:
License
Related Packages
Run Poolster OpenAPI generation from Vite, Rollup, webpack, esbuild, Rspack, Rol...
Unplugin to strip inter-node whitespace in Astro and Svelte templates (Vite/Roll...
Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.
Unplugin for Styleframe. Use it with Vite, Webpack, Astro, Nuxt, Rollup, Rspack,...
Version History
| Version | Released | License |
|---|---|---|
| 5.11.6 | MIT | |
| 5.11.5 | MIT | |
| 5.11.4 | MIT | |
| 5.11.3 | MIT | |
| 5.11.2 | MIT | |
| 5.11.1 | MIT | |
| 5.11.0 | MIT | |
| 5.10.4 | MIT | |
| 5.10.3 | MIT | |
| 5.10.2 | MIT | |
| 5.10.1 | MIT | |
| 5.10.0 | MIT | |
| 5.9.6 | MIT | |
| 5.9.5 | MIT | |
| 5.9.4 | MIT | |
| 5.9.3 | MIT | |
| 5.9.2 | MIT | |
| 5.9.1 | MIT | |
| 5.9.0 | MIT | |
| 5.8.4 | MIT | |
| 5.8.3 | MIT | |
| 5.8.2 | MIT | |
| 5.8.1 | MIT | |
| 5.8.0 | MIT | |
| 5.7.0 | MIT | |
| 5.6.3 | MIT | |
| 5.6.2 | MIT | |
| 5.6.1 | MIT | |
| 5.6.0 | MIT | |
| 5.5.6 | MIT |
Showing the latest 30 of 215. See every release on npm
Pre-releases (567)
| Version | Released | License |
|---|---|---|
| 6.0.0-alpha.35 | MIT | |
| 6.0.0-alpha.34 | MIT | |
| 6.0.0-alpha.33 | MIT | |
| 6.0.0-alpha.32 | MIT | |
| 6.0.0-alpha.31 | MIT | |
| 6.0.0-alpha.30 | MIT | |
| 6.0.0-alpha.29 | MIT | |
| 6.0.0-alpha.28 | MIT | |
| 6.0.0-alpha.27 | MIT | |
| 6.0.0-alpha.26 | MIT | |
| 6.0.0-alpha.25 | MIT | |
| 6.0.0-alpha.24 | MIT | |
| 6.0.0-alpha.23 | MIT | |
| 6.0.0-alpha.22 | MIT | |
| 6.0.0-alpha.21 | MIT | |
| 6.0.0-alpha.20 | MIT | |
| 6.0.0-alpha.19 | MIT | |
| 6.0.0-alpha.18 | MIT | |
| 6.0.0-alpha.17 | MIT | |
| 6.0.0-alpha.16 | MIT | |
| 6.0.0-alpha.15 | MIT | |
| 6.0.0-alpha.14 | MIT | |
| 6.0.0-alpha.13 | MIT | |
| 6.0.0-alpha.12 | MIT | |
| 6.0.0-alpha.11 | MIT | |
| 6.0.0-alpha.10 | MIT | |
| 6.0.0-alpha.9 | MIT | |
| 6.0.0-alpha.8 | MIT | |
| 6.0.0-alpha.7 | MIT | |
| 6.0.0-alpha.6 | MIT |
Showing the latest 30 of 567. See every release on npm