esm-pathnames
v1.0.15
Published
You can use __dirname and __filename when using ESM
Downloads
5
Maintainers
Readme
ESM-PathNames
You can use __dirname
and __filename
when using ESM(ECMAScript module).
Install
npm i esm-pathnames
Usage
import { getPathNames } from 'esm-pathnames';
const { __dirname, __filename } = getPathNames(import.meta);
Restrictions
- The browser environment is not yet supported.