d2js: doesn't support import
First of all - I'm grateful for JS version. And it already covers a lot of my wishes.
Second - I do understand why WASM version doesn't support filesystem access out of the box.
But it would be nice to allow for nodejs package (maybe via configuration) to directly access file system
Quick and dirty workaround https://github.com/stereobooster/beoe/pull/10
reopening since dynamic imports still aren't supported
A true streaming implementation is actually not possible. WASM to JS calls are synchronous, so to use D2's stream-on-demand import mechanism, we'd have to await some node openfile api which we can't do from WASM.
The alternative I considered is that D2.js can fake it by frontloading all the files before going into WASM, but that defeats the purpose and users can just do this themselves if that's the desired behavior.