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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user