Skip to content

ganeshkbhat/esm-file-dir-constants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esm-consts

work with esm __filepath and __dirname pathing constants in imports as in commonjs nodejs environment

Demos can be found in the folder demos

USAGE:


import { getDirname, getFilename } from "./node_module/esm-constants/src/polyfill.__dirname.regex.js";
import { default as getpaths } from "esm-consts";

const __dirname = getDirname();
console.log(__dirname);

const __filename = getFilename();
console.log(__filename);

About

work with esm filepath dirname constants in imports

Resources

License

Stars

Watchers

Forks

Packages

No packages published