calvinmetcalf / rollup-plugin-node-builtins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path posix reference

CMCDragonkai opened this issue · comments

The Nodejs path module has a posix property that explicitly forces the utilisation of the posix version of the path functions (this is important when developing unix apps on windows). Since this plugin supplies the join in posix form, I believe there should be a circular reference of path.posix that points back to itself. The currently generated code shows this:

var path = {
   extname: extname,
   basename: basename,
   dirname: dirname,
   sep: sep,
   delimiter: delimiter,
   relative: relative,
   join: join,
   isAbsolute: isAbsolute,
   normalize: normalize,
   resolve: resolve
 };

There should be one more property called posix that points back to path. I'm not sure how that's done in Node, perhaps they point back to the path module?