An esbuild plugin that automatically reloads the browser page whenever a new build completes in watch mode. Version 0.4.1 is the latest stable release. It works by injecting a WebSocket listener into the bundle and triggering a page reload on rebuild. Unlike general-purpose live reloaders, this plugin is tightly integrated with esbuild's watch mode and does nothing during regular builds. It supports configurable host, port, reconnect timeout, and retry settings. Released on an as-needed cadence with no recent updates.
npm install esbuild-reloaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up esbuild watch mode with esbuild-reloader plugin to auto-reload on rebuild.
Ensure the esbuild build config has `watch: true`.
Adjust CSP to allow 'ws://' connections to the specified host/port.
Prefer esbuild's built-in serve mode or use a more actively maintained reload plugin.
Add `watch: true` to your esbuild build options.
Use `import reloader from 'esbuild-reloader'` or `const reloader = require('esbuild-reloader')`.