Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library from CDN? #24

Open
jcubic opened this issue Jul 31, 2021 · 2 comments
Open

How to use this library from CDN? #24

jcubic opened this issue Jul 31, 2021 · 2 comments

Comments

@jcubic
Copy link

jcubic commented Jul 31, 2021

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?

@jcubic
Copy link
Author

jcubic commented Jul 31, 2021

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.

@MartinKolarik
Copy link

MartinKolarik commented Jul 31, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants