Closed konsumer closed 10 months ago
@konsumer Thanks for opening an issue! I already added this so you should be able to use it like so:
import { configure, BFSRequire } from 'browserfs'
import { Buffer } from 'buffer';
await configure({
fs: 'OverlayFS',
options: {
readable: {
fs: 'ZipFS',
options: {
zipData: Buffer.from(await fetch('myzip.zip').then(r => r.arrayBuffer()))
}
},
writable: {
fs: 'LocalStorage'
}
}
});
const fs = BFSRequire('fs');
Please read Releases and compatibility going forward.
Hi, I love BrowserFS! It's been really useful for WASM/WASI.
In projects where I use it, I always end up adding this, since I work with mostly ES6 modules, and async/await:
so I can do things like this:
would you consider adding this to BrowserFS, so it's built-in? I'd be happy to PR for it.