3 ms·
Can you load WASM modules dynamically like we in do in JS with import()?
by pier25 6y ago
Can you load WASM modules dynamically like we in do in JS with import()?
- steveklabnik 6y agoIn some sense, that's the only thing you can do in the browser, as you have to execute JS to instantiate the wasm. The code in this post actually uses import to dynamically import said JS that imports the wasm.
- pier25 6y agoRight, I guess the tooling would need to support code splitting into separated wasm modules like we do with Webpack or Rollup.