Example implementation of combining main JavaScript file and WebWorker JavaScript file which uses WebAssembly
フロントエンドのJavaScriptに、Worker上で動作するJavaScriptコードおよびWebAssemblyバイナリを埋め込む。これにより1つのjsファイルだけを読み込めばよくなる。
Windows10上のコマンドプロンプトで、emscripten 2.0.xおよびpython 3.6以上が動作するよう環境変数がセットされていること
build.bat
npx http-server -c-1
ブラウザでhttp://localhost:8080/dist/を開く