Skip to content

Update jekyll serve to properly handle WASM #7743

@totorigolo

Description

@totorigolo

Expected Behaviour

bundle exec jekyll serve doesn't provide the right Content-type for .wasm files. Currently, it gives application/octet-stream; charset=utf-8. It works on GitHub Pages though.

Current Behavior

Should be application/wasm.

I checked mime-db and webrick, they both added support for the WebAssembly MIME type. However, simply updating lib/jekyll.mime.types (via script/vendor-mimes) doesn't appear to be enough, because the Content-type then becomes application/wasm; charset=utf-8, which doesn't work with streaming:

Note: extra parameters are not allowed, including the empty application/wasm;.
https://webassembly.github.io/spec/web-api/index.html#streaming-modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions