Skip to content

Commit

Permalink
fix(android): return proper mimeType for .mjs files (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Oct 15, 2019
1 parent 55a8e82 commit 173a313
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ private String getMimeType(String path, InputStream stream) {
Log.d(IonicWebViewEngine.TAG, "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")) {
Expand Down

0 comments on commit 173a313

Please sign in to comment.