diff --git a/android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java b/android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java index ed495c8f8..4bf058549 100755 --- a/android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java +++ b/android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java @@ -326,7 +326,7 @@ private String getMimeType(String path, InputStream stream) { Log.d(LogUtils.getCoreTag(), "We shouldn't be here"); } if (mimeType == null) { - if (path.endsWith(".js")) { + if (path.endsWith(".js") || path.endsWith(".mjs")) { // Make sure JS files get the proper mimetype to support ES modules mimeType = "application/javascript"; } else if (path.endsWith(".wasm")) {