Instantiating wasm built with emscripten

I am trying to convert some code to a worker that uses 4 different webassembly modules (compiled from C/C++ libraries using emscripten) depending on the data that is posted. We had been using the .js file generated by emscripten to load and instantiate the module, but his fails on the Worker when it tries to do a require() to detect the environment. I am unclear how to correctly instantiate the module in a Worker, trying to import the .wasm files and using WebAssembly.instantiate() complains about not having the correct imports object. Is there a clear guide for how to do this correctly?
Was this page helpful?