File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ function newRouter(): Router {
135135 pageFilePath = pageFilePath . replace ( / \. j s $ / , '.lean.js' )
136136 }
137137
138- pageModule = import ( /*@vite -ignore*/ pageFilePath )
138+ if ( import . meta. env . SSR ) {
139+ pageModule = import ( /*@vite -ignore*/ pageFilePath + '?t=' + Date . now ( ) )
140+ } else {
141+ pageModule = import ( /*@vite -ignore*/ pageFilePath )
142+ }
139143 }
140144
141145 if ( inBrowser ) {
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ export async function build(
5252 }
5353
5454 const entryPath = path . join ( siteConfig . tempDir , 'app.js' )
55- const { render } = await import ( pathToFileURL ( entryPath ) . toString ( ) )
55+ const { render } = await import (
56+ pathToFileURL ( entryPath ) . toString ( ) + '?t=' + Date . now ( )
57+ )
5658
5759 await task ( 'rendering pages' , async ( ) => {
5860 const appChunk =
Original file line number Diff line number Diff line change @@ -52,7 +52,11 @@ export async function renderPage(
5252 try {
5353 // resolve page data so we can render head tags
5454 const { __pageData } = await import (
55- pathToFileURL ( path . join ( config . tempDir , pageServerJsFileName ) ) . toString ( )
55+ pathToFileURL (
56+ path . join ( config . tempDir , pageServerJsFileName )
57+ ) . toString ( ) +
58+ '?t=' +
59+ Date . now ( )
5660 )
5761 pageData = __pageData
5862 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments