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

Access to path module from browser #47

Open
jcubic opened this issue May 3, 2020 · 3 comments
Open

Access to path module from browser #47

jcubic opened this issue May 3, 2020 · 3 comments

Comments

@jcubic
Copy link
Contributor

jcubic commented May 3, 2020

I'm using dist/lightning-fs.min.js from https://cdn.jsdelivr.net/ and it seems that path module is not exposed. It would be nice if you don't need to use browser-fs just to have path.join and path.split.

Or is there a way to access it?

@billiegoose
Copy link
Member

billiegoose commented May 4, 2020

Try npm install path-browserify :-)

@jcubic
Copy link
Contributor Author

jcubic commented May 4, 2020

It don't work with just browser, it have node.js require in output files the same as lighting-fs you can't use it for instance in Codepend using some npm CDN service.

Also lighting-fs don't have dist written in ES5 (actually use lot of latest JS like async..await in dist directory), so if you want to support some old browser you need to use Babel on node_modules which you usually disable.

@jcubic
Copy link
Contributor Author

jcubic commented May 4, 2020

So lighthing-fs is not actually replacement for BrowserFS you can't use it in the same way. BrowserFS is broken because you can't actually ise path in service worker but this is not good alternative.

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