From 66cf64e6d127dd8473e582d11e1133acda6c3bc8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 24 Dec 2025 12:38:25 +0800 Subject: [PATCH] fix: always log error when failed to fetch page --- src/client/app/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/app/index.ts b/src/client/app/index.ts index 1f1e8069..761c2d92 100644 --- a/src/client/app/index.ts +++ b/src/client/app/index.ts @@ -131,7 +131,9 @@ function newRouter(): Router { } if (import.meta.env.DEV) { - pageModule = import(/*@vite-ignore*/ pageFilePath).catch(() => { + pageModule = import(/*@vite-ignore*/ pageFilePath).catch((e) => { + // page load could fail for other reasons, don't swallow + console.error(e) // try with/without trailing slash // in prod this is handled in src/client/app/utils.ts#pathToFile const url = new URL(pageFilePath!, 'http://a.com')