Skip to content

Turn barrels on

output.barrel defaults to false, so no barrel is generated until you set it. Set it on defineConfig to enable a root barrel and the default every plugin without its own output.barrel inherits.

kubb.config.ts
typescript
import { defineConfig } from 'kubb/config'
import { pluginTs } from '@kubb/plugin-ts'

export default defineConfig({
  input: './petStore.yaml',
  output: { path: './src/gen', clean: true, barrel: { type: 'named' } },
  plugins: [pluginTs()],
})