fix(pages-router): rename data-vinext-head to data-next-head#1559
Conversation
Pages Router <Head> now emits the canonical `data-next-head=""` attribute matching Next.js, rather than the vinext-specific `data-vinext-head="true"`. This unblocks `_document` head lookups in the deploy suite.
|
/bigbonk review |
commit: |
|
There was a problem hiding this comment.
Verified against Next.js source (packages/next/src/pages/_document.tsx:616, packages/next/src/client/head-manager.ts:57,70) and their E2E tests (test/e2e/next-head/index.test.ts). The attribute name, empty-string value, and selector pattern all match upstream. No remaining data-vinext-head references in the codebase.
One minor observation for a future follow-up (not blocking): Next.js scopes its client-side removal selector by tag type (${type}[data-next-head]), while vinext removes all [data-next-head] elements at once in syncClientHead. This is functionally equivalent since vinext re-appends everything immediately after, but noting it for parity tracking.
LGTM — clean rename, tests updated.
|
Approved PR #1559. The change is correct and matches Next.js behavior:
|
Refs #1475 — attribute rename only. Follow-up issue: #1569.
Summary
<Head>now emits the canonicaldata-next-headattribute (empty value) instead ofdata-vinext-head="true".Out of scope (tracked in #1569)
_document.getInitialProps()head-tag merge orderDo not close #1475 when this PR merges — close it when #1569 also lands.
Test plan
vp checkpasses