github / github/pages-gem

WASM served with incorrect MIME type when running locally with jekyll serve

Open
#695 9 comments 0 reactions 1 assignee Claimed by @dennispan View on GitHub
Dominant language
Ruby
Stars
1.9k
Forks
360
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use a web assembly (wasm) module, but wasm modules must be served with the content type `application/wasm`, and when running `bundle exec jekyll serve` to test the site locally, they are instead served with the content type `application/octet-stream` used for unrecognized file types. As far as I can tell, this was fixed upstream in Webrick back in 2019, but the github-pages gem is using an outdated version of jekyll which is in turn using an outdated version of webrick that doesn't have the fix.

I tried pushing my changes to github and wasm modules are served with the correct MIME type on a live github pages site. I'm not sure why it works live and is broken locally when the entire point of the github-pages gem is to replicate the same configuration for local testing in order to avoid such issues, but it seems like this can at least be easily fixed by updating the dependencies of the gem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.