babel-plugin-transform-dirname-filename
JSON →Babel plugin (v1.1.0) that rewrites __dirname and __filename to static values at compile time, preserving original source file paths in bundled output. Stable, no recent updates since 2022. Different from other solutions (e.g., webpack.DefinePlugin) as it works specifically with Babel for transpilation, ensuring that after bundling, __dirname and __filename reflect the source file location rather than the output directory. Suitable for Node.js packages distributed as compiled code.
Traffic · last 30 days ↓57% vs prev 7d
total hits 21
actors 7 distinct systems
last hit 1d ago AhrefsBot
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇮🇹 Italy