{"id":25273,"library":"esbuild-debug-tools","title":"esbuild Debug Tools","description":"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.","status":"active","version":"0.0.10","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install esbuild-debug-tools","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-debug-tools","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-debug-tools","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for building and bundling; plugin relies on esbuild's build API","package":"esbuild","optional":false}],"imports":[{"note":"ESM-only; use named import. Also works with TypeScript as types are shipped.","wrong":"const WatchPlugin = require('esbuild-debug-tools').WatchPlugin","symbol":"WatchPlugin","correct":"import { WatchPlugin } from 'esbuild-debug-tools'"},{"note":"There is no default export; must use named import.","wrong":"import esbuildDebugTools from 'esbuild-debug-tools'","symbol":"startDebugServer","correct":"import { startDebugServer } from 'esbuild-debug-tools'"}],"quickstart":{"code":"import { startDebugServer, WatchPlugin } from 'esbuild-debug-tools';\n\n// Use WatchPlugin in esbuild context\nconst watchPlugin = WatchPlugin({\n  onStart: () => console.log('Build started'),\n  onEnd: (result) => console.log('Build finished', result)\n});\n\n// Start debug server\nstartDebugServer({\n  debugPort: 8080,\n  htmlPagePath: './dist/index.html',\n  apiPathRewrite: {\n    original: '/api/',\n    alias: 'https://api.example.com/'\n  }\n});\n\nconsole.log('Debug server running on port 8080');","lang":"typescript","description":"Shows how to import WatchPlugin for build hooks and startDebugServer for a local debug server with API path rewriting."},"warnings":[{"fix":"Use a separate livereload plugin or reload page manually.","message":"No live reload: you must provide your own livereload plugin or manually refresh the browser.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure esbuild version meets at least 0.17.10, preferably ^0.19.2.","message":"Requires esbuild >=0.17.10, but peer dependency specifies ^0.19.2. Using older esbuild may cause runtime errors.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Always pass an onEnd handler to silence default logging.","message":"WatchPlugin will print to console if no config is provided; this may be unexpected in production.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.19.2':55 'api':47 'avoid':50 'build':20,42 'built':63 'built-in':62 'config':38 'consol':39 'cor':51 'debug':2,28 'definit':58 'differenti':33 'earli':9 'esbuild':1,19,54 'helper':6 'issu':52 'javascript':65 'librari':7 'live':60 'local':27 'log':40 'monitor':18 'month':11 'offer':35 'path':31 'provid':14 'proxi':48 'releas':12 'reload':61 'requir':53 'result':43 'rewrit':32 'run':25 'server':29 'ship':56 'simpl':46 'stage':10 'startdebugserv':23 'tini':5 'tool':3 'typescript':57,66 'v0.0.10':8 'watchplugin':16 'zero':37 'zero-config':36","created_at":"2026-05-01T13:43:55.042777+00:00","updated_at":"2026-05-01T13:43:55.042777+00:00","problems":[{"fix":"Run 'npm install esbuild-debug-tools' and verify import statements use named exports: import { WatchPlugin } from 'esbuild-debug-tools'.","cause":"Package not installed or import path incorrect.","error":"Error: Cannot find module 'esbuild-debug-tools'"},{"fix":"Use named import: import { WatchPlugin } from 'esbuild-debug-tools'.","cause":"Attempted to use default import instead of named import.","error":"TypeError: esbuild_debug_tools_1.WatchPlugin is not a function"},{"fix":"Update esbuild to ^0.19.2: 'npm install esbuild@^0.19.2'.","cause":"Installed esbuild version is too old.","error":"Error: The service is not available (esbuild >= 0.17.10 required)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esbuild-debug-tools","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}