kompiler

raw JSON →
7.0.170 verified Fri May 01 auth: no javascript maintenance

A framework-agnostic compiler/transpiler that bundles Babel, Rollup, and Node script management into a single watch-driven workflow. Current stable version is 7.0.170. Released irregularly as a personal tool. Unlike full-featured bundlers, it focuses on rapid development with built-in static server, automatic restarts, and path mappings. Configuration is done via package.json under the 'kompiler' key. Supports custom Babel presets, multiple builds, Node script watching, and HTTP file auto-updates. Primarily intended for the author and friends, with minimal documentation and breaking changes between versions.

error Cannot find module 'kompiler'
cause Global installation missing or local node_modules not present.
fix
Install globally: npm install -g kompiler, or use npx kompiler.
error Unknown option 'watch' in kompiler config
cause Configuration key name mismatch or version-specific changes.
fix
Check configuration adheres to the current version schema. In v7, 'watch' inside 'builds' must be an array of file paths.
breaking In version 7.0.0+, configuration schema changed from 'compiler' to 'kompiler' key in package.json. Watch paths are now arrays instead of strings.
fix Update package.json: rename key from 'compiler' to 'kompiler', and convert single watch paths to arrays.
deprecated The 'autoupdates' feature is deprecated and may be removed in a future release.
fix Remove 'autoupdates' from configuration; use external tools like curl or wget instead.
gotcha If 'input' is a folder, output must be a folder as well; otherwise build fails silently.
fix Ensure that when input is a directory, output is also a directory (e.g., 'dist/').
gotcha The static server does not support HTTP range requests (206 Partial Content). This affects video/audio streaming on browsers.
fix Use 'express: true' in build config to enable the Express server with full HTTP support.
npm install kompiler
yarn add kompiler
pnpm add kompiler

Quickstart showing minimal package.json configuration to transpile a single file and run the build.

// In package.json:
{
  "kompiler": {
    "builds": [
      {
        "input": ["src/index.js"],
        "output": "dist/bundle.js",
        "minified": true
      }
    ]
  }
}
// Then run:
// npx kompiler