Remove defunct live-reload Doesn't work when serving static files
1 file changed, 3 insertions(+), 4 deletions(-)
changed files
M src/index.ts → src/index.ts
@@ -1,8 +1,7 @@ import path from "node:path"; import fs, { Stats } from "node:fs"; import fsp from "node:fs/promises"; -import { withHtmlLiveReload } from "bun-html-live-reload"; -import type { BunFile } from "bun-types"; +import type { BunFile, Serve } from "bun"; import readConfig from "./config";@@ -104,7 +103,7 @@ function parseIfModifiedSinceHeader(header: string | null): number { return header ? new Date(header).getTime() + 999 : 0; } -export default withHtmlLiveReload({ +export default { fetch: async function (request) { const pathname = new URL(request.url).pathname; const file = files.get(pathname);@@ -147,4 +146,4 @@ } } return serveFile(file); }, -}); +} satisfies Serve;