Express middleware for development with esbuild. Bundles TypeScript/JavaScript source files in memory, serves them directly, and automatically reloads the browser on file changes via Server-Sent Events. Current stable version is 0.8.0. Peer dependency on esbuild >0.17. Key differentiators: zero-config live reload injection, no disk writes, mounts as Express Router, merges loader and plugin configs so you can extend defaults. Best for teams that already use Express and esbuild and want a lightweight dev server without Webpack or Vite.
npm install esbuild-dev-routerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a basic Express dev server with esbuild-dev-router, bundling src/index.ts into memory and serving static files from public/.
Mount at app root: app.use(devRouter({...})). Do NOT mount under a subpath like '/assets'.Remove any 'write' option from the config; it does nothing.
If you provide 'loader', your entries are added alongside .png and .jpg defaults. For other options, your value completely overrides the default.
Upgrade Node.js to version 18 or later.
Reference the bundled file in HTML as '/index.js' (strip the directory and ts extension).
Mount the router at the root: app.use(devRouter({...}))Install esbuild >=0.17: npm install -D esbuild
Use ESM imports (import devRouter from 'esbuild-dev-router') or enable ESM in your project.
Provide an entryPoints array: devRouter({ entryPoints: ['src/index.ts'] })