viewport.missing
Declare a <meta name="viewport"> so mobile browsers render at the right scale
warningper pageguideline
Why it matters
Without it a phone renders the page at desktop width and scales it down. The layout is not broken, only unreadable, which is why it survives review.
What the finding looks like
The message goflag prints, with example values substituted.
warn viewport.missing Page has no <meta name="viewport"> — mobile browsers will render at desktop width.
Add a viewport meta
Written for the Next.js App Router. The finding is correct on any stack; only the remedy assumes one.
// app/layout.tsx — a dedicated export, not part of `metadata`.
export const viewport = { width: "device-width", initialScale: 1 };Says who?
This rule is guideline, and it cites the documentsbelow. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.
- MDN — Viewport meta tag
MDN / Mozilla · guideline
- HTML Living Standard — standard metadata names
WHATWG · normative