Tree-shakeable node:path polyfill
npm install path-esmpath module from Node.js for browsers, in a tree-shakeable ESM form.
path][path] module for environments that do not have it, like browsers.
npm install path-esm
`
Usage
`javascript
import path from 'path'
const filename = 'logo.png';
const logo = path.join('./assets/img', filename);
document.querySelector('#logo').src = logo;
`
API
See the [Node.js path docs][path]. path-esm currently matches the Node.js 10.3 API.
path-esm` only implements the POSIX functions, not the win32 ones.