|
|
|
@ -43,7 +43,7 @@ export async function bundle(
|
|
|
|
|
serverResult: Rollup.RollupOutput
|
|
|
|
|
pageToHashMap: Record<string, string>
|
|
|
|
|
}> {
|
|
|
|
|
const pageToHashMap = Object.create(null)
|
|
|
|
|
const pageToHashMap = Object.create(null) as Record<string, string>
|
|
|
|
|
const clientJSMap = Object.create(null)
|
|
|
|
|
|
|
|
|
|
// define custom rollup input
|
|
|
|
@ -202,7 +202,15 @@ export async function bundle(
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return { clientResult, serverResult, pageToHashMap }
|
|
|
|
|
// sort pageToHashMap to ensure stable output
|
|
|
|
|
const sortedPageToHashMap = Object.create(null) as Record<string, string>
|
|
|
|
|
Object.keys(pageToHashMap)
|
|
|
|
|
.sort()
|
|
|
|
|
.forEach((key) => {
|
|
|
|
|
sortedPageToHashMap[key] = pageToHashMap[key]
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return { clientResult, serverResult, pageToHashMap: sortedPageToHashMap }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const cache = new Map<string, boolean>()
|
|
|
|
|