Registry / devops / esbd
library3.3.11jsnpmunverified

CLI wrapper that turns esbuild config files into commands with enhanced developer experience for browser and Node applications. Version 3.3.11 (stable), pairs with esbuild >=0.25.0. Unlike Vite or Parcel which use esbuild only as a transpiler, esbd delegates to esbuild's bundler for 10-100x speed and adds live-reload, HTML entry points, sideband type checking, in-browser error overlay, and asset copying without sacrificing performance. Does not support HMR or unbundled dev. Ships TypeScript types and supports JS plugins. Monthly releases on GitHub.

npm install esbd
INSTALL
IMPORT
SIG · ESBD
E
esbd
devopsjavascriptv3.3.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configure
✓ import { configure } from 'esbd'
✗ const { configure } = require('esbd')
ESM-only since v3; use import syntax even if package type is commonjs
createServer
✓ import { createServer } from 'esbd'
✗ const createServer = require('esbd').createServer
Use for programmatic server creation in Node scripts
typeCheck
✓ import { typeCheck } from 'esbd'
Optional function for sideband TypeScript type checking using tsc

Creates a CLI script that builds an HTML entry point with live-reload and optional type checking.

#!/usr/bin/env node import { configure } from 'esbd'; configure({ entryPoints: ['./index.html'], absWorkingDir: __dirname, outdir: './build', // Optional: enable live-reload for web apps serve: { port: 3000, onRequest: (req, res) => { console.log(req.url); } }, // Optional: sideband type checking typeCheck: true }); console.log('Running esbd...');
esbd --version
Debug
Known issues
breakingv3.x is ESM-only. CJS require() will not work.
fix
Convert to ES modules by setting 'type': 'module' or using .mjs extension, and use import syntax.
affects: >=3.0.0
breakingPeer dependency esbuild must be >=0.25.0. Older versions will fail at runtime.
fix
Update esbuild to >=0.25.0: npm install esbuild@latest
affects: >=3.0.0
deprecatedThe 'bundle' config option was removed. Use 'configure' instead.
fix
Replace .bundle(...) calls with configure({...}) and pass the same options object.
affects: >=2.0.0
gotchaHTML entry points require the file to be named with .html extension and contain a <script> tag referencing a valid JS/TS entry. Otherwise build may silently produce empty output.
fix
Ensure your HTML file includes a <script type="module" src="./main.ts"> or similar.
affects: >=0.0.0
gotchaIn-browser error overlay requires `serve` mode. Using `node-dev` mode will not show overlay for runtime errors.
fix
For browser apps, use `configure({ serve: { port: 8080 } })` and serve over HTTP.
affects: >=0.0.0
gotchaSideband type checking runs tsc under the hood; if your tsconfig is misconfigured, it may produce false positives or fail silently.
fix
Ensure tsconfig.json has `compilerOptions.noEmit: true` and `compilerOptions.isolatedModules: true` for compatibility.
affects: >=0.0.0
Errors
Common errors & fixes
ReferenceError: require is not defined in ES module scope, you can use import instead
Using CJS require() with an ESM-only package (v3+)
fix
Change to `import { configure } from 'esbd'` or switch to CommonJS if using an older version (v2)
The 'esbuild' peer dependency is not installed. Install it using 'npm install esbuild'
Missing or incompatible esbuild version (must be >=0.25.0)
fix
Run `npm install -D esbuild@latest` (must be >=0.25.0)
Error: No entry points specified. Provide at least one entry point in configure({ entryPoints: [...] })
Missing entryPoints property in the config object
fix
Add `entryPoints: ['./index.ts', './index.html']` to your configure call
TypeError: esbd is not a function
Trying to call default export (e.g., `const esbd = require('esbd')`) which does not exist; must use named import
fix
Use `import { configure } from 'esbd'` instead
Upgrade
Version history
3.3.11latest on npm
Audit
Dependencies
esbuildrequiredpeer dependency; must be installed separately and match version >=0.25.0
Agent activity
6 hits · last 30 days
node
6
Resources
esbd — npm install esbd · libregistry