esbuild-plugin-fileloc

JSON →
library 0.0.6 ·javascript
verified Apr 27, 2026

An esbuild plugin that replaces __dirname, __filename, __line, __relativedirname, and __relativefilename with actual source file metadata at build time. Version 0.0.6, no release cadence documented. Unlike Node.js's __dirname (which resolves to the output file), this plugin provides the original source path, and the __line variable is unique among Node-like bundlers. Ships TypeScript declarations. Lightweight, no dependencies. Suitable for esbuild bundling projects that need source-level location globals.

total hits 7
actors 3 distinct systems
last hit 6d ago human
GPTBot
2
Search engines
1
Humans
1

top countries 🇨🇦 Canada · 🇺🇸 United States