Skip to content

Commit

Permalink
runJs: correct MIME type for wasm files (#1562)
Browse files Browse the repository at this point in the history
runJs task: correct MIME type for wasm files

Currently wasm files are served with `application/octet-stream` which is not working.
I understand that wasm is not supported by Korge yet, but it can still be used i.e. to offload heavy game computations.
  • Loading branch information
smaugfm authored May 1, 2023
1 parent 1d81099 commit 18e40bb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ fun File.miniMimeType() = when (this.extension.toLowerCase()) {
"jpg", "jpeg" -> "image/jpeg"
"svg" -> "image/svg+xml"
"mp3" -> "audio/mpeg"
"wasm" -> "application/wasm"
else -> if (this.exists()) Files.probeContentType(this.toPath()) ?: "application/octet-stream" else "text/plain"
}

Expand Down

0 comments on commit 18e40bb

Please sign in to comment.