File tree 3 files changed +13
-3
lines changed
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ function newRouter(): Router {
135
135
pageFilePath = pageFilePath . replace ( / \. j s $ / , '.lean.js' )
136
136
}
137
137
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
+ }
139
143
}
140
144
141
145
if ( inBrowser ) {
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ export async function build(
52
52
}
53
53
54
54
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
+ )
56
58
57
59
await task ( 'rendering pages' , async ( ) => {
58
60
const appChunk =
Original file line number Diff line number Diff line change @@ -52,7 +52,11 @@ export async function renderPage(
52
52
try {
53
53
// resolve page data so we can render head tags
54
54
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 ( )
56
60
)
57
61
pageData = __pageData
58
62
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments