Skip to content

Vite

unplugin-kubb/vite runs Kubb as a Vite plugin. Add it to vite.config.ts and pass your Kubb config to the config option.

Install

shell
bun add -d unplugin-kubb
shell
pnpm add -D unplugin-kubb
shell
npm install --save-dev unplugin-kubb
shell
yarn add -D unplugin-kubb

Configure

vite.config.ts
typescript
import  from 'unplugin-kubb/vite'
import {  as  } from 'vite'
import {  } from 'kubb'
import {  } from '@kubb/plugin-ts'

const  = ({
  : '.',
  : { : './petStore.yaml' },
  : { : './src/gen', : true },
  : [({ : { : 'models' } })],
})

export default ({
  : [({  })],
})