From 928d7d88c46f63a1f2b7acd63ee5865401068131 Mon Sep 17 00:00:00 2001 From: yuxino Date: Thu, 5 Nov 2020 20:00:11 +0800 Subject: [PATCH] feat: support lowercase url --- src/node/build/build.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/node/build/build.ts b/src/node/build/build.ts index f46d556c..3ccc0ce0 100644 --- a/src/node/build/build.ts +++ b/src/node/build/build.ts @@ -32,6 +32,12 @@ export async function build(buildOptions: BuildOptions = {}) { (chunk) => chunk.type === 'asset' && chunk.fileName.endsWith('.css') ) 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 // 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