fix: always log error when failed to fetch page

pull/5074/head
Evan You 8 months ago
parent 8ed6ea048c
commit 66cf64e6d1
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A

@ -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')

Loading…
Cancel
Save