{"library":"paths.macro","title":"Babel paths.macro","description":"A Babel macro that provides compile-time access to file path information like __dirname and __filename, returning static values rather than runtime variables. Current version 3.0.1. It uses babel-plugin-macros for integration. Key differentiators: no need for __filename polyfills in Node ESM, works with bundlers that support macros, and supports multiple path forms (base, file, extension, filename, npmRoot, gitRoot). Commonly used in tooling and build-time code generation.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install paths.macro"],"cli":null},"imports":["import base from 'paths.macro'","import { filename } from 'paths.macro'","import { file } from 'paths.macro'","import { fileAbsolute } from 'paths.macro'","import { npmRoot } from 'paths.macro'","import { gitRoot } from 'paths.macro'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// input.js\nimport base, { filename, file, extension } from 'paths.macro';\n\nconsole.log('base:', base);       // \"/src/\"\nconsole.log('file:', file);       // \"input.js\"\nconsole.log('filename:', filename); // \"input\"\nconsole.log('ext:', extension);    // \".js\"","lang":"javascript","description":"Shows how to import and log multiple path macros from a source file. The values are computed at build time.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}