path-browserify
path-browserify copied to clipboard
Use deno_std path module?
Would you mind switch to use deno_std's path module? API is compatible with Node.js, simply use deno bundle to output es module, make bundlers do tree shaking better
// mod.ts
import { win32, posix } from 'https://deno.land/[email protected]/path/mod.ts'
export { win32, posix }
export const {
basename,
delimiter,
dirname,
extname,
format,
fromFileUrl,
isAbsolute,
join,
normalize,
parse,
relative,
resolve,
sep,
toFileUrl,
toNamespacedPath
} = posix
deno bundle mod.ts index.js
// package.json
{
"module": "./index.js",
"main": "./index.js",
"type": "module"
}