Bug 1589895 - Add default JavaScript MIME type for .mjs used for ES modules. r=bzbarsky
authorTom Schuster <evilpies@gmail.com>
Wed, 13 Nov 2019 19:12:02 +0000
changeset 501782 4d198d162b2aaf7ba6d86fc6c71942b6ee8e43ef
parent 501781 e7d3683f6809ec00058aa3d3bc2a707e55b31733
child 501783 afb4b226ff0409682b7bb2eb2475f227bc52aa96
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1589895
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1589895 - Add default JavaScript MIME type for .mjs used for ES modules. r=bzbarsky Seems like this is the recommended MIME type for the JavaScript module system: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#Basic_example_structure Differential Revision: https://phabricator.services.mozilla.com/D52885
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -482,17 +482,17 @@ static const nsExtraMimeTypeEntry extraM
 #endif
     {APPLICATION_GZIP2, "gz", "gzip"},
     {"application/x-arj", "arj", "ARJ file"},
     {"application/rtf", "rtf", "Rich Text Format File"},
     {APPLICATION_XPINSTALL, "xpi", "XPInstall Install"},
     {APPLICATION_PDF, "pdf", "Portable Document Format"},
     {APPLICATION_POSTSCRIPT, "ps,eps,ai", "Postscript File"},
     {APPLICATION_XJAVASCRIPT, "js", "Javascript Source File"},
-    {APPLICATION_XJAVASCRIPT, "jsm", "Javascript Module Source File"},
+    {APPLICATION_XJAVASCRIPT, "jsm,mjs", "Javascript Module Source File"},
 #ifdef MOZ_WIDGET_ANDROID
     {"application/vnd.android.package-archive", "apk", "Android Package"},
 #endif
     {IMAGE_ART, "art", "ART Image"},
     {IMAGE_BMP, "bmp", "BMP Image"},
     {IMAGE_GIF, "gif", "GIF Image"},
     {IMAGE_ICO, "ico,cur", "ICO Image"},
     {IMAGE_JPEG, "jpeg,jpg,jfif,pjpeg,pjp", "JPEG Image"},