Skip to content

Commit 04386b9

Browse files
authored
fix(android): return proper mimeType for wasm files (#439)
1 parent 97cdc09 commit 04386b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/android/com/ionicframework/cordova/webview/WebViewLocalServer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ private String getMimeType(String path, InputStream stream) {
355355
if (path.endsWith(".js")) {
356356
// Make sure JS files get the proper mimetype to support ES modules
357357
mimeType = "application/javascript";
358+
} else if (path.endsWith(".wasm")) {
359+
mimeType = "application/wasm";
358360
} else {
359361
mimeType = URLConnection.guessContentTypeFromStream(stream);
360362
}

0 commit comments

Comments
 (0)