Skip to content

Commit 173a313

Browse files
authored
fix(android): return proper mimeType for .mjs files (#455)
1 parent 55a8e82 commit 173a313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ private String getMimeType(String path, InputStream stream) {
360360
Log.d(IonicWebViewEngine.TAG, "We shouldn't be here");
361361
}
362362
if (mimeType == null) {
363-
if (path.endsWith(".js")) {
363+
if (path.endsWith(".js") || path.endsWith(".mjs")) {
364364
// Make sure JS files get the proper mimetype to support ES modules
365365
mimeType = "application/javascript";
366366
} else if (path.endsWith(".wasm")) {

0 commit comments

Comments
 (0)