Closed nimeshamin closed 4 years ago
Some build processes may require a custom task to copy over any files to be found by the webapp. I did this in https://github.com/AnthumChris/fetch-stream-audio/blob/master/scripts/build.sh when using Parcel for https://fetch-stream-audio.anthum.com/
I was able to get the wasm to be included with webpack by importing the wasm file, then returning the renamed filepath to Module.locateFile. The Emscripten output should just work at this point.
Hi @nimeshamin. If it's ok with you, I'd like to close this out since it's more related to React than this specific repo. Sorry that I can't be of more assistance with your project.
I'm not sure if it's intended for this to work in a React app, but I'm seeing issues with with init after overriding the locateFile function for Emscripten, so wasm is being found appropriately. Current failures are at setting the ctor of the exported function, where global and exports are not defined. Environment is React/Typescript/Webpack4