insert-module-globals

insert implicit module globals into a module-deps stream
v7.2.1 URL: https://unpkg.com/insert-module-globals@7.2.1/index.js
OpenBrowse Files
__filename__dirnameglobalprocessmodule-depsbrowser-packbrowserify

desm

get the file directory from import.meta.url
v1.3.1 URL: https://unpkg.com/desm@1.3.1/index.js
OpenBrowse Files
esmimporturldirname__dirname

current-module-paths

Access to __filename and __dirname within ECMAScript modules
v1.1.2 URL: https://unpkg.com/current-module-paths@1.1.2/index.js
OpenBrowse Files
__dirname__filenamemodulepathsmodulesESMECMAScriptimportcommonjscjsmjs

filedirname

Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)
v3.4.0 URL: https://unpkg.com/filedirname@3.4.0/index.cjs
OpenBrowse Files
__dirname__filenamecommonjsdenodeno-editiondeno-entrydenolanddirectorydirnameecmascriptes2022es5esmexport-defaultfilefilenameimportmjsmodulesnodepathpathspolyfilltypedtypestypescript

paths.macro

Babel plugin that returns an object containing paths like __dirname and __filename as static values
v3.0.1 URL: https://unpkg.com/paths.macro@3.0.1/macro.js
OpenBrowse Files
__dirname__filenamebabelbabel-plugin-macrosbaseextentionfilefilenamegitRootnpmRootpathpathspluginstaticvalueworking directory