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
With Webpack 5, I think you can remove the
locateFile
hook, thefile-loader
dependency and simplifyto
provided that you change the
.wasm
rule in the Webpack config to:It might help with issues locating the wasm asset when loading the page.