Open jcubic opened 4 years ago
Try npm install path-browserify :-)
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.
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.
I'm using
dist/lightning-fs.min.js
fromhttps://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 havepath.join
andpath.split
.Or is there a way to access it?