Please fixe content-type for .wasm (WebAssembly)
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->
Current behavior
I’m compiling WebAssembly (*.wasm) files and can’t serve these properly to the browser. Any “.wasm”-file is of content-type: “application/octet-stream”
Expected behavior
The proper content-type should be “application/wasm”
Environment
Browser:
- [ ] Chrome (desktop) version XX
- [x] Firefox version 62.0.2
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Live Server: 5.1.1
- Platform: Windows, compiling in WSL-ubuntu
- Visual Studio Code: 1.27.2
Others
Issue Analytics
- State:
- Created 5 years ago
- Reactions:50
- Comments:9
Top Results From Across the Web
Python3 — Content-Type Application/WASM — How to fix.
Getting started is only a few clicks away from running Web assembly in your Chrome browser. Here are some tips and tricks to...
Read more >Incorrect response MIME type. Expected 'application/wasm'.
I am piddling around with Electron and a web assembly C# SPA framework called Blazor that I'm wanting to try and get working...
Read more >aws amplify not serving content-type for wasm - Stack Overflow
I've written a wasm module with wasm-pack in rust. I'm using it as part of a react SPA. I've published the wasm library...
Read more >Warning about "Content-Type" being configured incorrectly
"HTTP Response Header "Content-Type" configured incorrectly on the ... Once everything was setup correctly on the server, it fixed itself ...
Read more >Optimizing WebAssembly Startup Time - PSPDFKit
This can be done using the WebAssembly.compile() function, which takes a typed array or ArrayBuffer containing the binary code of the .wasm module...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also still have this problem. Here is a quick work around though, if you need it:
I only have the MIME-type issue, when I try to load my wasm-module via the
WebAssembly.instantiateStreaming(fetch('path/to/my_module.wasm'))
-API. With the slightly more verbose an less efficient API:WebAssembly.instantiate(bytes)
the import works completely fine.Both in comparison:
how is this still not fixed…