Open MiniaczQ opened 2 years ago
Are you using http.server and not SimpleHTTPServer? For me http.server uses the correct mime types for js and wasm.
I used this exact command (excluding path) python -m http.server --directory
http.server
does some naive mime type guessing.
What does python -c 'import mimetypes;print(mimetypes.guess_type("/bevy_game.js"))'
say?
I suspected you have broken/missingmime.types
System information
OS: Windows 10 Browsers: Opera GX & Firefox Python: 3.9.10
What you did
Build a project for WASM and tried to launch it with python server as instructed here.
What you expected to happen
App to run properly.
What actually happened
App didn't run. Debugger said that a
.js
file was sent astext/plain
, hence could not be run as a module.Solutions
Additional context
Not everyone seems to have this issue, even with the same python version.
Running the
basic-http-server
worked just fine, so it's a python thing.I'm not sure which solution is the right call.