Skip to content

Commit 0eb8a37

Browse files
yoldarjcesarmobile
authored andcommitted
fix(Android): return proper mimeType for wasm files
1 parent f5c0bbd commit 0eb8a37

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ private String getMimeType(String path, InputStream stream) {
363363
if (path.endsWith(".js")) {
364364
// Make sure JS files get the proper mimetype to support ES modules
365365
mimeType = "application/javascript";
366+
} else if (path.endsWith(".wasm")) {
367+
mimeType = "application/wasm";
366368
} else {
367369
mimeType = URLConnection.guessContentTypeFromStream(stream);
368370
}

0 commit comments

Comments
 (0)