the wasm module is inlined in the source, which will emit a huge JS file for big modules.
WebAssembly.instantiate and WebAssembly.Module both requires the module to be represented in JS
WebAssembly.instantiate and WebAssembly.Instance both do synchronous instantiation
If you choose to use create a Webpack loader, the wasm binary will be "managed" by Webpack and use the optimized/recommended instantiation: WebAssembly.instantiateStreaming.
I see some issues:
WebAssembly.instantiate
andWebAssembly.Module
both requires the module to be represented in JSWebAssembly.instantiate
andWebAssembly.Instance
both do synchronous instantiationIf you choose to use create a Webpack loader, the wasm binary will be "managed" by Webpack and use the optimized/recommended instantiation:
WebAssembly.instantiateStreaming
.Here is an example: https://github.com/xtuc/holyc/blob/master/loader.js