src/index.js
function loadWasm(name, req, load) {
  req(['raw!' + name], response => {
    response.arrayBuffer().then(buffer =>
      WebAssembly.instantiate(buffer, /*importObject*/)
    )
    .then(
      obj => {
        load(obj.instance.exports);
      },
      load.error
    );
  });
}
function loadWasm(name, req, load) {
  req(['raw!' + name], response => {
    response.arrayBuffer().then(buffer =>
      WebAssembly.instantiate(buffer, /*importObject*/)
    )
    .then(
      obj => {
        load(obj.instance.exports);
      },
      load.error
    );
  });
}
function loadWasm ( name , req , load ) { req ( [ 'raw!' + name ] , response => { response . arrayBuffer ( ) . then ( buffer => WebAssembly . instantiate ( buffer , /*importObject*/ ) ) . then ( obj => { load ( obj . instance . exports ) ; } , load . error ) ; } ) ; }
Only support wasm without importObject. How to know what kind of importObject the wasm file needs?
Only support wasm without importObject . How to know what kind of importObject the wasm file needs?