From fb16601115245a7593d40a094ea00d2716a58b77 Mon Sep 17 00:00:00 2001 From: ruucm Date: Tue, 10 Sep 2024 10:05:26 +0900 Subject: [PATCH] fix --- tsup.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsup.config.ts b/tsup.config.ts index 0d938fd..030838d 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -34,7 +34,7 @@ export default defineConfig((options): any => { async onSuccess() { if (!isDev) return; - io.emit("build"); + io?.emit("build"); // Create the HTTP server const server = http.createServer((req, res) => { @@ -42,7 +42,7 @@ export default defineConfig((options): any => { let filePath = path.join( __dirname, "dist", - req.url === "/" ? "index.html" : req.url + req.url === "/" || !req.url ? "index.html" : req.url ); let extname = String(path.extname(filePath)).toLowerCase(); // need to remove query from extname