Skip to content

Commit 832b9a1

Browse files
committed
fix mime type
1 parent 6ecd8c9 commit 832b9a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/preview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class Server {
7272
if (pathname === "/_observablehq/runtime.js") {
7373
send(req, "/@observablehq/runtime/dist/runtime.js", {root: "./node_modules"}).pipe(res);
7474
} else if (pathname === "/_observablehq/client.js") {
75-
end(req, res, await rollupClient("./src/client/preview.js"), "text/javascript");
75+
end(req, res, await rollupClient("./src/client/preview.js"), "application/javascript");
7676
} else if (pathname.startsWith("/_observablehq/")) {
7777
send(req, pathname.slice("/_observablehq".length), {root: publicRoot}).pipe(res);
7878
} else if (pathname.startsWith("/_import/")) {
@@ -84,7 +84,7 @@ export class Server {
8484
if (!isEnoent(error)) throw error;
8585
throw new HttpError("Not found", 404);
8686
}
87-
end(req, res, rewriteModule(js, file, createImportResolver(this.root)), "text/javascript");
87+
end(req, res, rewriteModule(js, file, createImportResolver(this.root)), "application/javascript");
8888
} else if (pathname.startsWith("/_file/")) {
8989
const path = pathname.slice("/_file".length);
9090
const filepath = join(this.root, path);

0 commit comments

Comments
 (0)