{"library":"babel-plugin-transform-dirname-filename","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"1.1.0","tags":["javascript","babel","plugin","dirname","filename","__dirname","__filename","compile","rewrite"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-transform-dirname-filename","imports":["// In .babelrc plugins array: 'transform-dirname-filename'"]},{"cmd":"yarn add babel-plugin-transform-dirname-filename","imports":[]},{"cmd":"pnpm add babel-plugin-transform-dirname-filename","imports":[]}],"homepage":null,"github":"https://github.com/TooTallNate/babel-plugin-transform-dirname-filename","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-transform-dirname-filename","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-transform-dirname-filename/compatibility"}}