path-browserify
path-browserify copied to clipboard
How to use this library from CDN?
I've tried to use on Codepen: https://cdn.jsdelivr.net/npm/path-browserify but this library can't be used in browser because it use module.export not UMD.
So I've tried to use browserify to build standalone file but it doesn't work:
browserify -s path -o path.js -e node_modules/path-browserify/index.js
got error that path.join is not a function because path is empty object.
How anyone can use this library in browser?
I think that, I've made mistake in config. The library work after running it with browserify. But still I don't understand why the library doesn't provide UMD so you can actually use in browser.
I don't think this project is meant to be used directly, without using browserify, but maybe this will help you: https://www.jsdelivr.com/package/npm/path-browser