A thin, opinionated wrapper for esbuild that watches and serves TypeScript files as ESM. Current stable version: 0.8.3. Release cadence: irregular, with multiple minor releases in 2024. Key differentiators: minimal codebase (<200 lines), zero runtime dependencies beyond esbuild, automatic source maps, and integrated dev server that maps entry .ts files to .js. Unlike esbuild's own --servedir, this directly serves compiled output with live rebuilds. No CLI, no live reload, no non-TS transformations. Requires Node >=19 or Bun >=1.0.30.
npm install barely-a-dev-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Starts a dev server on port 3333 that watches and serves TypeScript files from the 'src' directory as ESM with source maps.
If you relied on custom glob patterns, update your entry points to match esbuild's built-in resolution.
Place library files outside entryRoot; only keep actual entry scripts inside.
Upgrade to >=0.7.0 and use bundleCSS option if CSS bundling is needed.
In <script> tags, set src='./index.js' (not .ts). The href attribute is informational only.
Check your code for ES2022 compatibility; override esbuildOptions.target if needed.
Update Bun to >=1.0.30 or use Node >=19.
Write a small script calling barelyServe() or run: node -e 'import("barely-a-dev-server").then(s => s.barelyServe({entryRoot: "src"}))'Use import syntax: import { barelyServe } from 'barely-a-dev-server'Correct import: import { barelyServe } from 'barely-a-dev-server'Ensure entryRoot is relative to current working directory and contains .ts files.