From 4a5bdade8dfc20c723b7d10941a79e80b0dc1177 Mon Sep 17 00:00:00 2001 From: dswbx Date: Fri, 9 Jan 2026 14:42:18 +0100 Subject: [PATCH] fix: handle lazy import errors for TestRoutes in development for nextjs --- app/src/ui/routes/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/ui/routes/index.tsx b/app/src/ui/routes/index.tsx index 2d9f793..6b3a3e4 100644 --- a/app/src/ui/routes/index.tsx +++ b/app/src/ui/routes/index.tsx @@ -16,9 +16,11 @@ import ToolsRoutes from "./tools"; // @ts-ignore let TestRoutes: any; -if (import.meta.env.DEV) { - TestRoutes = lazy(() => import("./test")); -} +try { + if (import.meta.env.DEV) { + TestRoutes = lazy(() => import("./test")); + } +} catch {} export function Routes({ BkndWrapper,