var importObject = {
  imports: {
    imported_func: function(arg) {
      console.log(arg);
    }
  }
};

onmessage = function(e) {
  console.log('module received from main thread');
  var mod = e.data;

  WebAssembly.instantiate(mod, importObject).then(function(instance) {
    instance.exports.exported_func();
  });

  var exports = WebAssembly.Module.exports(mod);
  console.log(exports[0]);
};

const importObject = {
  imports: {
    imported_func: arg => {
      console.log(arg);
    }
  }
};

window.onmessage = function(event) {
  console.log("module received from main thread");
  const module = event.data;

  WebAssembly.instantiate(module, importObject)
    .then(instance => {
      instance.exports.exported_func();
    });

  const exports = WebAssembly.Module.exports(module);
  console.log(exports[0]);
};

Update wasm_worker.js