File tree Expand file tree Collapse file tree
core/tauri-runtime/src/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch
3+ " tauri-runtime " : patch
4+ ---
5+
6+ Fix ` .mjs ` not being recognised as a file extension for JavaScript files (` text/javascript ` ).
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl MimeType {
5353 Some ( "js" ) => Self :: Js ,
5454 Some ( "json" ) => Self :: Json ,
5555 Some ( "jsonld" ) => Self :: Jsonld ,
56+ Some ( "mjs" ) => Self :: Js ,
5657 Some ( "rtf" ) => Self :: Rtf ,
5758 Some ( "svg" ) => Self :: Svg ,
5859 Some ( "mp4" ) => Self :: Mp4 ,
@@ -115,6 +116,9 @@ mod tests {
115116 let jsonld: String = MimeType :: parse_from_uri ( "https:/example.com/hello.jsonld" ) . to_string ( ) ;
116117 assert_eq ! ( jsonld, String :: from( "application/ld+json" ) ) ;
117118
119+ let mjs: String = MimeType :: parse_from_uri ( "https://example.com/bundled.mjs" ) . to_string ( ) ;
120+ assert_eq ! ( mjs, String :: from( "text/javascript" ) ) ;
121+
118122 let rtf: String = MimeType :: parse_from_uri ( "https://example.com/document.rtf" ) . to_string ( ) ;
119123 assert_eq ! ( rtf, String :: from( "application/rtf" ) ) ;
120124
You can’t perform that action at this time.
0 commit comments