fix: Fix hashing issue with inline scripts (#1591)

This commit is contained in:
Yunsup Sim
2025-04-19 09:35:18 +09:00
committed by GitHub
parent 862756fd5b
commit 7eb32bdac8
@@ -128,8 +128,8 @@ export function devHtmlPrerender(
// Resolve virtualized inline scripts
if (id.startsWith(resolvedVirtualInlineScript)) {
// id="virtual:wxt-inline-script?<hash>"
const hash = Number(id.substring(id.indexOf('?') + 1));
return inlineScriptContents[hash];
const newHash = hash(id.substring(id.indexOf('?')));
return inlineScriptContents[newHash];
}
// Ignore chunks during HTML file pre-rendering