Integrations
Generate with Rollup
Run Kubb code generation during Rollup builds.
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.
rollup.config.ts
import kubb from 'kubb/rollup'
import config from './kubb.config'
export default {
input: 'src/index.ts',
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