Node's path builtin module exposed as dual ESM/CJS and browser-compatible out of the box.
npm install path-unified