|
|
@ -121,9 +121,9 @@ function newRouter(): Router {
|
|
|
|
|
|
|
|
|
|
|
|
return createRouter((path) => {
|
|
|
|
return createRouter((path) => {
|
|
|
|
let pageFilePath = pathToFile(path)
|
|
|
|
let pageFilePath = pathToFile(path)
|
|
|
|
|
|
|
|
let pageModule = null
|
|
|
|
|
|
|
|
|
|
|
|
if (!pageFilePath) return null
|
|
|
|
if (pageFilePath) {
|
|
|
|
|
|
|
|
|
|
|
|
if (isInitialPageLoad) {
|
|
|
|
if (isInitialPageLoad) {
|
|
|
|
initialPath = pageFilePath
|
|
|
|
initialPath = pageFilePath
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -135,11 +135,14 @@ function newRouter(): Router {
|
|
|
|
pageFilePath = pageFilePath.replace(/\.js$/, '.lean.js')
|
|
|
|
pageFilePath = pageFilePath.replace(/\.js$/, '.lean.js')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pageModule = import(/*@vite-ignore*/ pageFilePath)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (inBrowser) {
|
|
|
|
if (inBrowser) {
|
|
|
|
isInitialPageLoad = false
|
|
|
|
isInitialPageLoad = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return import(/*@vite-ignore*/ pageFilePath)
|
|
|
|
return pageModule
|
|
|
|
}, Theme.NotFound)
|
|
|
|
}, Theme.NotFound)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|