esbuild-plugin-pino is an esbuild plugin that enables bundling Pino (v7+) with applications by generating extra files required by Pino's worker-thread-based transport architecture. Current stable version is 2.3.3, released regularly with dependency updates. Unlike naive bundling attempts that break Pino's runtime, this plugin automatically produces thread-stream.js, pino-worker.js, pino-pipeline-worker.js, pino-file.js, and any custom transport bundles alongside your main output. It supports ESM and CJS, ships TypeScript types, and requires esbuild 0.25.0–0.25.8, pino >=7, plus optional pino-pretty and thread-stream as peer dependencies.
Verified import paths — ran on the pinned version, not inferred.
Plugin provides both ESM default export and CJS module.exports. The require pattern shown is also correct but avoids potential .default issue in mixed environments.
Named export available since v2.3.3. Using a different name like pinoPlugin still works but may cause confusion.
PluginOptions is a TypeScript type; use type-only import to avoid runtime inclusion.
CommonJS require works as plugin exports a single function. Avoid naming it 'pino' to prevent confusion with the pino logger.
Shows basic usage: import plugin, pass it to esbuild build with transports option, and use pino logger with that transport at runtime.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.