Kirby Panel Plugin Bundler

3.4.1 · active · verified Tue Apr 21

kirbyup is a zero-configuration bundler specifically designed for Kirby Panel plugins. It streamlines the development and build process by leveraging Vite internally, providing fast Hot Module Replacement (HMR) during development and optimized production builds. The current stable version is 3.4.1, with active development progressing towards v4.0.0, which introduces significant breaking changes related to Vue 3 migration. Its primary differentiator is its tailored approach for the Kirby CMS ecosystem, abstracting away complex bundler configurations for panel developers and allowing them to focus on plugin logic rather than build tooling. The project exhibits a steady release cadence, marked by regular updates and ongoing alpha releases for its next major version. It supports Node.js environments version 18 and above and ships with TypeScript types, facilitating modern JavaScript and TypeScript development workflows for Kirby plugins.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates `kirbyup` setup with a `package.json`, a `kirbyup.config.ts` for custom Vite configuration and path aliases, and a basic plugin entry point in `src/index.js` for a Kirby Panel section.

{
  "name": "my-kirby-plugin",
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "dev": "kirbyup serve src/index.js",
    "build": "kirbyup src/index.js"
  },
  "devDependencies": {
    "kirbyup": "^3.4.1"
  }
}
// kirbyup.config.ts
import { defineConfig } from 'kirbyup/config'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'

const currentDir = fileURLToPath(new URL('.', import.meta.url))

export default defineConfig({
  alias: {
    // Example: Alias for Panel core components if you clone Kirby repo
    '@/': `${resolve(currentDir, 'kirby/panel/src')}/`
  },
  vite: {
    // Custom Vite options (e.g., add plugins)
    css: {
      preprocessorOptions: {
        scss: { /* ... */ }
      }
    }
  }
})

// src/index.js (your plugin entry point)
// Example: A simple Vue component for your Kirby Panel plugin
import { createApp } from 'vue'
import MyPanelComponent from './components/MyPanelComponent.vue'

panel.plugin('your/plugin', {
  sections: {
    'my-custom-section': {
      component: MyPanelComponent,
      props: ['headline']
    }
  }
})

view raw JSON →