4 ms·
But then you go "hang on, doesn't ESM exist?" and you realize that argument 4 isn't even true. You can literally do what this argument says you can't, by creati
by TheRealPomax 7mo ago
But then you go "hang on, doesn't ESM exist?" and you realize that argument 4 isn't even true. You can literally do what this argument says you can't, by creating a blob instead of "writing a temp file" and then importing that using the same dynamic import we've had available since <checks his watch> 2020.
- notnullorvoid 7mo agoThere's also a module expression proposal, that would remove the need to use blob imports. https://github.com/tc39/proposal-module-expressions https://github.com/tc39/proposal-module-expressions
- dfabulich 7mo agoA virtual filesystem makes it possible for the ESM you import to statically import other files in the virtual filesystem, which isn't possible by just dynamically importing a blob. Anything your blob module imports has to be updated to dynamically import its dependencies via blobs.
- apatheticonion 7mo agoCorrect. Especially painful if you use Worker threads or .node files