Skip to content

Commit fcbef0d

Browse files
authored
fix(android): return proper mimeType for .mjs files (#456)
1 parent 0d637a0 commit fcbef0d

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
@@ -352,7 +352,7 @@ private String getMimeType(String path, InputStream stream) {
352352
Log.d(IonicWebViewEngine.TAG, "We shouldn't be here");
353353
}
354354
if (mimeType == null) {
355-
if (path.endsWith(".js")) {
355+
if (path.endsWith(".js") || path.endsWith(".mjs")) {
356356
// Make sure JS files get the proper mimetype to support ES modules
357357
mimeType = "application/javascript";
358358
} else if (path.endsWith(".wasm")) {

0 commit comments

Comments
 (0)