diff --git a/src/TestHTTPServer.zig b/src/TestHTTPServer.zig index 9867600d..4f9a8ac6 100644 --- a/src/TestHTTPServer.zig +++ b/src/TestHTTPServer.zig @@ -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"; }