Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git i/packages/web/script/build.ts w/packages/web/script/build.ts
2index 9bdcdb3..e9ce1c9 100755
3--- i/packages/web/script/build.ts
4+++ w/packages/web/script/build.ts
5@@ -14,6 +14,13 @@ for await (const file of new Bun.Glob("./public/*").scan()) {
6 await Bun.write(file.replace("./public/", "./dist/"), Bun.file(file));
7 }
8
9+const distFiles = await fs.readdir("./dist");
10+const htmlFile = distFiles.find(file => file.startsWith("index-") && file.endsWith(".html"));
11+
12+if (htmlFile) {
13+ await fs.rename(`./dist/${htmlFile}`, "./dist/index.html");
14+}
15+
16 let html = await Bun.file("./dist/index.html").text();
17 html = html.replace("<!--static-->", Rendered);
18 await Bun.write("./dist/index.html", html);