-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
application/wasm support in Chrome #1598
application/wasm support in Chrome #1598
Comments
Actually, I just noticed that I do not get a Content-Type at all ... |
OK, as it usually happens, one finds the solution 2 minutes after posting the question. I can confirm that the (config options) code below works:
... I just had to clean my browser cache, the stored version didn't have the mime yet ... sigh |
Maybe you could add this example on your website on how to add custom mime-types |
@Zambiorix since this is so important, I've decided to add this fix into the core for now. browser-sync@2.26.3 |
Issue details
I am using browser-sync to support my development of WebAssembly modules.
This works in Safari and FireFox, but in Chrome I get the following error:
(index):1 Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
It seems that browser-sync (or the underlying serve-static) does not recognise .wasm files and set the corresponding (application/wasm) Content-Type header.
I tried to define a new MIME type (see below), but that does not seem to work.
How can I solve this?
Steps to reproduce/test case
Please provide necessary steps for reproduction of this issue, or better the
reduced test case (without any external dependencies).
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
browser-sync start --config config/bs-config.js
In my config file, I define a new callback where I update the serve-static mime types.
The output log shows that application/wasm is indeed added, but still I do not get the correct mime-type in my browser...
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
{Browsersync init code here}
The text was updated successfully, but these errors were encountered: