diff --git a/src/client/app/index.ts b/src/client/app/index.ts index cdb79a35..29b66e77 100644 --- a/src/client/app/index.ts +++ b/src/client/app/index.ts @@ -117,6 +117,7 @@ function newRouter(): Router { isInitialPageLoad = false const page = import(/*@vite-ignore*/ pageFilePath) + // fallback to base url when visit a non-exist page at first page.catch(() => (location.href = import.meta.env.BASE_URL)) return page }