Skip to content

Commit

Permalink
fix(android): return proper mimeType for .mjs files (#2017)
Browse files Browse the repository at this point in the history
  • Loading branch information
cho45 authored and jcesarmobile committed Oct 15, 2019
1 parent 9b77835 commit b7fc6c8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit b7fc6c8

Please sign in to comment.