Skip to content

defineConfig

defineConfig is a helper for creating a typed bunny.config.ts configuration file.

import { defineConfig } from "@farbenmeer/bunny";
function defineConfig(config: BunnyConfig): BunnyConfig
interface BunnyConfig {
vite?: UserConfig;
}
PropertyTypeDescription
viteUserConfig (from Vite)Extend or override the Vite configuration used during development and production builds.

Create a bunny.config.ts in your project root:

import { defineConfig } from "@farbenmeer/bunny";
export default defineConfig({
vite: {
// Any Vite configuration
},
});

The config file is optional. If it does not exist, Bunny uses its defaults.

Bunny always adds vite-tsconfig-paths to the Vite plugins so TypeScript path aliases work out of the box. Your vite.plugins are merged alongside it.