A lightweight wrapper around esbuild that adds a static file server with live reload functionality. Version 1.0.1 is the latest stable release. It is ideal for development workflows where you want esbuild's fast build times combined with automatic browser refreshes on file changes. Unlike heavier alternatives like webpack-dev-server, esbuild-serve has a minimal dependency footprint and focuses solely on serving static files with live reload via esbuild's watch mode. It wraps the ultralight 'serve' HTTP server and requires no complex configuration.
npm install esbuild-serveNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates starting an esbuild build with watch mode and a static server with live reload on port 8000.
Ensure your esbuild configuration outputs a file that changes on every successful rebuild. Consider using a placeholder comment.
Either omit the serve options argument entirely or provide all desired options explicitly.
Monitor the package's GitHub releases for migration notes.
Run 'npm install esbuild-serve --save-dev' (or --save) to install the package.
Change to default import: import esbuildServe from 'esbuild-serve'
Use import syntax instead of require. Ensure your project is configured for ESM (e.g., type: 'module' in package.json).