My question is a bit different: how to load the native std:kv-storage from a webpack bundle. It seems the only options are to either load the whole bundle as a module, or use async import like: eval('import("std:kv-storage")').
Ah, yeah, unlike bundling tools like Rollup, webpack doesn't have the ability to output modern JavaScript module scripts, only classic scripts. The article links to a feature request on webpack to support this: https://github.com/webpack/webpack/issues/8896
In the meantime, there are lots of workarounds, such as e.g. creating a script to bridge from built-in modules (which webpack doesn't support) to globals (which webpack does support). E.g. `import { storage } from 'std:kv-storage'; window.kvStorageStorage = storage;` then use `kvStorageStorage` in your webpack code.