Skip to content

Provide __dirname and __filename for ESM packages.

License

Notifications You must be signed in to change notification settings

zjffun/node-cjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-cjs

Provide __dirname and __filename for ESM packages.

Installation

npm

npm install node-cjs

yarn

yarn add node-cjs

Usage

import cjs from "node-cjs";

const { __dirname, __filename } = cjs(import.meta);

About

Provide __dirname and __filename for ESM packages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published