Builderz

0.11.0 · active · verified Tue Apr 21

Builderz is a zero-configuration JavaScript and TypeScript bundler designed for simplicity and efficiency, aiming to streamline the build process for both libraries and applications by minimizing setup overhead. The current stable version is `0.11.0`, with a development cadence that sees frequent minor updates and patch releases, typically addressing dependency updates, performance enhancements like caching, and bug fixes. Key differentiators include its 'zero-configuration' approach, the ability to build packages even with invalid `package.json` files (addressing a common development pain point), support for parallel build tasks for improved performance, and a robust caching mechanism introduced in `v0.10.0`. It supports both CommonJS (CJS) and ES Module (ESM) output formats and offers both a Command Line Interface (CLI) and a programmatic API for integration into development workflows.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates setting up a `package.json`, a `builderz.config.js` with ES module support, and an entry file, then running a build via CLI.

{
  "name": "my-builderz-app",
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "build": "builderz build -c builderz.config.js",
    "start": "node dist/esm/index.js"
  },
  "devDependencies": {
    "builderz": "^0.11.0"
  }
}

// builderz.config.js
import { defineConfig } from 'builderz';

export default defineConfig({
  entries: ['src/index.js'],
  output: {
    dir: 'dist',
    formats: ['esm', 'cjs'],
    fileName: '[name].[format].js'
  },
  plugins: [],
  external: [] // Example: externalize node built-in modules
});

// src/index.js
import path from 'node:path';
import url from 'node:url';

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

console.log(`Hello from Builderz! Running from: ${__dirname}`);

view raw JSON →