From 69d947b6abde5a7b75be66a6d34940e718fccf3e Mon Sep 17 00:00:00 2001 From: gearnode Date: Sun, 2 Mar 2025 09:30:39 +0100 Subject: [PATCH] Fix build script lint errors Signed-off-by: gearnode --- apps/console/scripts/esbuild.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/console/scripts/esbuild.mjs b/apps/console/scripts/esbuild.mjs index a3611d82b..aed0cc20b 100644 --- a/apps/console/scripts/esbuild.mjs +++ b/apps/console/scripts/esbuild.mjs @@ -6,6 +6,7 @@ import * as esbuild from "esbuild"; import fs from "node:fs/promises"; import http from "node:http"; import path from "node:path"; +import process from "node:process"; import tailwindcssPlugin from "@tailwindcss/postcss"; @@ -176,7 +177,7 @@ if (command === "watch") { headers: req.headers, }; - const extensionPattern = /\.[^\/]+$/; + const extensionPattern = /\.[^/]+$/; const proxyReq = http.request(options, (proxyRes) => { if (proxyRes.statusCode === 404 && extensionPattern.test(req.url)) { @@ -197,7 +198,8 @@ if (command === "watch") { res.writeHead(200, { "Content-Type": "text/html" }); res.end(data); }) - .catch((_err) => { + .catch((err) => { + console.error("Error reading index.html:", err); res.writeHead(500, { "Content-Type": "text/plain" }); res.end("500 - Internal Server Error"); });