electron-app-bundler

raw JSON →
6.0.1 verified Fri May 01 auth: no javascript

CLI tool to build Electron apps with esbuild, supporting hot reload dev server for the renderer process, static file copying, and optional use of Vite or Astro for the renderer. Current stable version is 6.0.1, with regular releases. Requires Node >=20 and peer dependencies astro >= 5.14.0, esbuild >= 0.20.0, vite >= 6.4.1. Uses a declarative JSON/YAML config file. Differentiates from other Electron bundlers by focusing on esbuild speed and supporting multiple main/preload/renderer configs with loaders and excludes.

error Package 'electron-app-bundler' is not recognized
cause Using old package name or typo
fix
Use correct package name: npx electron-app-bundler
error Error: Config file not found: electron-app-bundler.config.json
cause Config file missing or named incorrectly (e.g., old name from v5)
fix
Create electron-app-bundler.config.json or specify path with --config
error The engine "node" is incompatible with this module
cause Node version <20
fix
Install Node.js version 20 or higher
breaking Package renamed in v6.0.0; old package name no longer works
fix Replace references to old name with 'electron-app-bundler'
breaking Config file names changed in v6.0.0; must use electron-app-bundler.config.json or .yaml
fix Rename config file to electron-app-bundler.config.*
deprecated Using --vite or --astro flags without installing the respective peer dependency will fail
fix Install astro or vite if using those flags
gotcha Node engine requirement >=20; older Node versions will cause errors
fix Update Node.js to version 20 or higher
gotcha Peer dependencies must be installed manually; not included automatically
fix Run npm install --save-dev astro esbuild vite
npm install electron-app-bundler
yarn add electron-app-bundler
pnpm add electron-app-bundler

Shows minimal config and CLI commands to build and run dev server with hot reload.

// Create electron-app-bundler.config.json
{
  "output": "dist",
  "main": {
    "entry": "src/main/index.ts",
    "output": {
      "directory": "main",
      "filename": "index.js"
    }
  },
  "renderers": [
    {
      "entry": "src/renderer/index.html",
      "output": {
        "directory": "renderer"
      }
    }
  ]
}

// Run build
npx electron-app-bundler build

// Run dev server with hot reload
npx electron-app-bundler dev --clean