File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export async function bundle(
43
43
serverResult : Rollup . RollupOutput
44
44
pageToHashMap : Record < string , string >
45
45
} > {
46
- const pageToHashMap = Object . create ( null )
46
+ const pageToHashMap = Object . create ( null ) as Record < string , string >
47
47
const clientJSMap = Object . create ( null )
48
48
49
49
// define custom rollup input
@@ -202,7 +202,15 @@ export async function bundle(
202
202
}
203
203
}
204
204
205
- return { clientResult, serverResult, pageToHashMap }
205
+ // sort pageToHashMap to ensure stable output
206
+ const sortedPageToHashMap = Object . create ( null ) as Record < string , string >
207
+ Object . keys ( pageToHashMap )
208
+ . sort ( )
209
+ . forEach ( ( key ) => {
210
+ sortedPageToHashMap [ key ] = pageToHashMap [ key ]
211
+ } )
212
+
213
+ return { clientResult, serverResult, pageToHashMap : sortedPageToHashMap }
206
214
}
207
215
208
216
const cache = new Map < string , boolean > ( )
You can’t perform that action at this time.
0 commit comments