{"id":40915,"library":"esbuild-hot-reload","title":"esbuild-hot-reload","description":"A plugin for esbuild that enables hot module replacement (HMR) during development. Current stable version is 1.0.6, with minimal release cadence. It simplifies setting up live reload for esbuild-based projects, focusing on ease of use with zero configuration. Unlike general-purpose tools like webpack-dev-server, this plugin is tightly integrated with esbuild's API and supports TypeScript out of the box. Requires TypeScript as a peer dependency.","status":"active","version":"1.0.6","language":"javascript","source_language":"en","source_url":"https://github.com/SPWizard01/esbuild-hot-reload","tags":["javascript","esbuild","hmr","reload","hot"],"install":[{"cmd":"npm install esbuild-hot-reload","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-hot-reload","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-hot-reload","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package; require() will fail.","wrong":"const { hotReloadPlugin } = require('esbuild-hot-reload')","symbol":"hotReloadPlugin","correct":"import { hotReloadPlugin } from 'esbuild-hot-reload'"},{"note":"Default export is the same as named export hotReloadPlugin.","symbol":"default","correct":"import hotReload from 'esbuild-hot-reload'"},{"note":"Type-only import; runtime import will cause error.","wrong":"import { HotReloadOptions } from 'esbuild-hot-reload'","symbol":"HotReloadOptions","correct":"import type { HotReloadOptions } from 'esbuild-hot-reload'"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport { hotReloadPlugin } from 'esbuild-hot-reload';\n\nawait build({\n  entryPoints: ['src/index.ts'],\n  bundle: true,\n  outdir: 'dist',\n  plugins: [hotReloadPlugin()],\n  watch: true,\n});\nconsole.log('Dev server running...');","lang":"typescript","description":"Demonstrates setting up esbuild with hot reload plugin using TypeScript entry point."},"warnings":[{"fix":"Add watch: true to esbuild build options.","message":"Plugin only works with esbuild's watch mode enabled.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to v1.0.6 or later if available.","message":"The plugin does not support custom WebSocket server configurations in v1.0.x.","severity":"deprecated","affected_versions":"1.0.0 - 1.0.5"},{"fix":"Run npm install typescript --save-dev.","message":"TypeScript peer dependency must be installed even if using JavaScript only.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.6':21 'api':63 'base':35 'box':70 'cadenc':25 'configur':44 'current':17 'depend':76 'dev':53 'develop':16 'eas':39 'enabl':10 'esbuild':2,8,34,61,78 'esbuild-bas':33 'esbuild-hot-reload':1 'focus':37 'general':47 'general-purpos':46 'hmr':14,79 'hot':3,11,81 'integr':59 'javascript':77 'like':50 'live':30 'minim':23 'modul':12 'peer':75 'plugin':6,56 'project':36 'purpos':48 'releas':24 'reload':4,31,80 'replac':13 'requir':71 'server':54 'set':28 'simplifi':27 'stabl':18 'support':65 'tight':58 'tool':49 'typescript':66,72 'unlik':45 'use':41 'version':19 'webpack':52 'webpack-dev-serv':51 'zero':43","created_at":"2026-06-04T18:49:52.312791+00:00","updated_at":"2026-06-04T18:49:52.312791+00:00","problems":[{"fix":"Run npm install esbuild-hot-reload.","cause":"Package not installed or path incorrect.","error":"Error: Cannot find module 'esbuild-hot-reload'"},{"fix":"Use import { hotReloadPlugin } from 'esbuild-hot-reload'.","cause":"Incorrect import syntax (CommonJS vs ESM).","error":"TypeError: hotReloadPlugin is not a function"},{"fix":"Ensure no firewall blocking; try changing port.","cause":"Browser blocking WebSocket or port conflict.","error":"Error: [plugin: hot-reload] WebSocket connection failed"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/SPWizard01/esbuild-hot-reload","github":"https://github.com/SPWizard01/esbuild-hot-reload","docs":null,"changelog":null,"pypi":null,"npm":"esbuild-hot-reload","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-06-04","next_check":"2026-09-02","install_tag":null}}