Registry / devops / esbuild-debug-tools

esbuild-debug-tools

JSON →
library0.0.10jsnpmunverified

A tiny helper library (v0.0.10, early stage, monthly releases) that provides a WatchPlugin to monitor esbuild builds and a startDebugServer to run a local debug server with path rewriting. Differentiates by offering zero-config console logging for build results and a simple API proxy to avoid CORS issues. Requires esbuild ^0.19.2, ships TypeScript definitions. No live reload built-in.

npm install esbuild-debug-tools
INSTALL
IMPORT
SIG · ESBUILD-DEBUG-TOOL
E
esbuild-debug-tools
devopsjavascriptv0.0.10
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.

WatchPlugin
import { WatchPlugin } from 'esbuild-debug-tools'
const WatchPlugin = require('esbuild-debug-tools').WatchPlugin
ESM-only; use named import. Also works with TypeScript as types are shipped.
startDebugServer
import { startDebugServer } from 'esbuild-debug-tools'
import esbuildDebugTools from 'esbuild-debug-tools'
There is no default export; must use named import.

Shows how to import WatchPlugin for build hooks and startDebugServer for a local debug server with API path rewriting.

import { startDebugServer, WatchPlugin } from 'esbuild-debug-tools'; // Use WatchPlugin in esbuild context const watchPlugin = WatchPlugin({ onStart: () => console.log('Build started'), onEnd: (result) => console.log('Build finished', result) }); // Start debug server startDebugServer({ debugPort: 8080, htmlPagePath: './dist/index.html', apiPathRewrite: { original: '/api/', alias: 'https://api.example.com/' } }); console.log('Debug server running on port 8080');
Debug
Known issues
gotchaNo live reload: you must provide your own livereload plugin or manually refresh the browser.
fix
Use a separate livereload plugin or reload page manually.
affects: >=0.0.0
breakingRequires esbuild >=0.17.10, but peer dependency specifies ^0.19.2. Using older esbuild may cause runtime errors.
fix
Ensure esbuild version meets at least 0.17.10, preferably ^0.19.2.
affects: >=0.0.0
gotchaWatchPlugin will print to console if no config is provided; this may be unexpected in production.
fix
Always pass an onEnd handler to silence default logging.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'esbuild-debug-tools'
Package not installed or import path incorrect.
fix
Run 'npm install esbuild-debug-tools' and verify import statements use named exports: import { WatchPlugin } from 'esbuild-debug-tools'.
TypeError: esbuild_debug_tools_1.WatchPlugin is not a function
Attempted to use default import instead of named import.
fix
Use named import: import { WatchPlugin } from 'esbuild-debug-tools'.
Error: The service is not available (esbuild >= 0.17.10 required)
Installed esbuild version is too old.
fix
Update esbuild to ^0.19.2: 'npm install esbuild@^0.19.2'.
Upgrade
Version history
0.0.10latest on npm
Audit
Dependencies
esbuildrequiredpeer dependency for building and bundling; plugin relies on esbuild's build API
Agent activity
4 hits · last 30 days
node
4
Resources
esbuild-debug-tools — npm install esbuild-debug-tools · libregistry