Lets the deployment check cope with pages the CMS host has filled

The check after a deploy compared the server's answer with dist byte for byte,
which fails once the host writes current data into the markers. Both sides are
now normalised first (regions, data block, offers, inline prices, site
address); everything else still has to match. The stand-in host no longer
injects the 404 page, like the real one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 17:02:17 +01:00
co-authored by Claude Sonnet 5.5
parent b2cb6351e1
commit d9ff875ade
5 changed files with 207 additions and 2 deletions
+5 -1
View File
@@ -312,7 +312,11 @@ export function startPreviewServer(
);
return;
}
const injection = file.endsWith('.html') ? options.inject?.() : null;
// Like the real host, the 404 page is not injected
const injection =
file.endsWith('.html') && status === 200
? options.inject?.()
: null;
if (injection) {
const body = injectCms(readFileSync(target, 'utf8'), injection);
send(