Closed JKRhb closed 3 years ago
Hi @JKRhb
Thanks for letting me know. I will have a look this evening 👍🏻
Can you please just point me to a simple wasm file/project to test it?
Sure it doesn't work? I just tested an application and it served the wasm file with Content-Type: application/wasm
.
Thank you for your fast response!
Sure it doesn't work? I just tested an application and it served the wasm file with
Content-Type: application/wasm
.
Hmm, maybe it is in fact a problem with my setup (I am trying to compile a Rust project to wasm using wasm-bindgen). I will investigate this a bit more :)
Could you on the other hand maybe give me a link to the application you have tested? :)
Could you on the other hand maybe give me a link to the application you have tested? :)
I served the src
folder of https://github.com/enable3d/enable3d-website. There is an ammo.wasm
file for the 3D Physics.
I got the same issue with the LS version 5.6.1. I compiled the https://github.com/google/monster-mash and the webpage simply fetch a wasm via js and the content-type is wrong, however the js somehow fall back to another load method upon the exception and the app works despite still showing these errors. I'm using Chrome 91
Hmm, I just fetched https://monstermash.zone/
and run it with five-server.
In the network tab of chrome I see:
Request URL: http://127.0.0.1:5500/monstermash.wasm
Content-Type: application/wasm
This is what I did to test it:
The website did not work, but the wasm file successfully loaded with 'application/wasm'
$ npx generate-static-site@latest https://monstermash.zone/ www
$ npx five-server@latest www
Describe the bug As it is the case with live-server, WASM modules are currently not served with the correct content-type but with as
application/octet-stream
causing an error the client side (also see this issue in the live-server repository).There is an existing PR in the live-server repository that can be used to fix this issue. Sadly, it is already open for more than a year :/ It would be awesome if you could fix this problem in your fork :)