When the WASM module is used on both the web and web worker targets, webpack decides to generates two .wasm files with their exports mangled in just slightly different ways for each of them. This leads to the client having to download the same WASM module twice.
When "Run" is pressed for the first time, it waits to load the WASM again, which takes time. With a slow Internet it looks like the UI is not doing anything.
When the WASM module is used on both the web and web worker targets, webpack decides to generates two .wasm files with their exports mangled in just slightly different ways for each of them. This leads to the client having to download the same WASM module twice.
Can we stop webpack from doing this?
Code: https://github.com/alvinhochun/rhai-playground/tree/webworker-test