Skip to content

How to use this library from CDN? #24

Open

Description

@jcubic

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?

Activity

  1. jcubic commented on Jul 31, 2021

    @jcubic
    Author

    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.

  2. MartinKolarik commented on Jul 31, 2021

    @MartinKolarik

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions