feat: support lowercase url

pull/116/head
yuxino 5 years ago
parent 287ca2f0da
commit 928d7d88c4

@ -32,6 +32,12 @@ export async function build(buildOptions: BuildOptions = {}) {
(chunk) => chunk.type === 'asset' && chunk.fileName.endsWith('.css') (chunk) => chunk.type === 'asset' && chunk.fileName.endsWith('.css')
) as OutputAsset ) as OutputAsset
Object.keys(pageToHashMap).forEach((key) => {
if (!pageToHashMap[key.toLocaleLowerCase()]) {
pageToHashMap[key.toLocaleLowerCase()] = pageToHashMap[key]
}
})
// We embed the hash map string into each page directly so that it doesn't // We embed the hash map string into each page directly so that it doesn't
// alter the main chunk's hash on every build. It's also embedded as a // alter the main chunk's hash on every build. It's also embedded as a
// string and JSON.parsed from the client because it's faster than embedding // string and JSON.parsed from the client because it's faster than embedding

Loading…
Cancel
Save