Merge pull request #1275 from lightpanda-io/wpt-mjs

wpt: allow mjs serve through test web server
This commit is contained in:
Karl Seguin
2025-12-16 06:49:01 +08:00
committed by GitHub

View File

@@ -100,6 +100,11 @@ fn getContentType(file_path: []const u8) []const u8 {
return "application/json";
}
if (std.mem.endsWith(u8, file_path, ".mjs")) {
// mjs are ECMAScript modules
return "application/json";
}
if (std.mem.endsWith(u8, file_path, ".html")) {
return "text/html";
}