I suspect this is slightly out of scope, but at the same time it's close enough that it may be worth a mention. Would module fragments be good candidates to also add support for arbitrary binary data within JS files? For instance:
I maintain a software which embeds multiple brotli-encoded strings. Since JS doesn't have a way to efficiently store binary data, I need to store them as base64, thus increasing the bundle size.
I opened in Node a discussion about Packaged apps (a single file embedding a full application, including data files, wasm, etc). Module fragments supporting binary data would allow to defer this to the userland, since userland could just store the application as a binary string along with the suitable decompression algorithm.
I do see binary content as out of scope--I really can't see how it can work syntactically in a JS file. I'd prefer an approach more like https://github.com/wpack-wg/bundled-responses for that use case.
I suspect this is slightly out of scope, but at the same time it's close enough that it may be worth a mention. Would module fragments be good candidates to also add support for arbitrary binary data within JS files? For instance:
I maintain a software which embeds multiple brotli-encoded strings. Since JS doesn't have a way to efficiently store binary data, I need to store them as base64, thus increasing the bundle size.
I opened in Node a discussion about Packaged apps (a single file embedding a full application, including data files, wasm, etc). Module fragments supporting binary data would allow to defer this to the userland, since userland could just store the application as a binary string along with the suitable decompression algorithm.