diff --git a/frontend/scripts/capture-screenshots.mjs b/frontend/scripts/capture-screenshots.mjs index 774781a..db83f88 100644 --- a/frontend/scripts/capture-screenshots.mjs +++ b/frontend/scripts/capture-screenshots.mjs @@ -37,7 +37,13 @@ async function withTheme(browser, theme) { return context } -const browser = await chromium.launch() +// Chromium pins *.localhost to loopback (RFC 6761), so /etc/hosts cannot point +// it at Traefik. The containerised run (root `make verify-docker`) passes the +// mapping through here instead; empty on a host run. +const RESOLVER = process.env.HOST_RESOLVER_RULES +const browser = await chromium.launch( + RESOLVER ? { args: [`--host-resolver-rules=${RESOLVER}`] } : {}, +) for (const theme of ["light", "dark"]) { const dir = `${OUT}/${theme}`