Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
- Clone this gist
npm install
npm start
- Open
http://localhost:8080
- Look at console
Note: Docker is required to build this project.
I filed a bug with webpack to make this integration easier.
More questions? Hit me up on Twitter.
License Apache-2.0
<3 Surma
EMScripten locateFile() not reading .WASM file after bundling with WebPack
#10637
I have converted my C library to WASM and wrapper JS using EMScripten. I also wrote my own JS library. I want to integrate both the libraries. I used Webpack to bundle my JS library including my Emscripten wrapper JS and added the WASM file using "file-loader" of WebPack. Initially, the Emscripten generated JS wrapper reads the WASM file using locateFile() method. But after bundling, the locate file is unable to locate the WASM file. Can someone please help me?