[PR #89] [MERGED] refactor(head): improve SSR head management and validation #299

Closed
opened 2026-05-06 12:39:03 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/89
Author: @ygcaicn
Created: 2/26/2026
Status: Merged
Merged: 3/29/2026
Merged by: @james-elicx

Base: mainHead: head


📝 Commits (4)

  • 32e6cc2 refactor(head): improve SSR head management and validation
  • d6890a8 Merge remote-tracking branch 'origin/main' into ygcaicn-head
  • 397f139 refactor(head): remove redundant ALLOWED_HEAD_TAGS guard in headChildToHTML
  • b7e9e16 refactor(head): hoist rawContentTags to module-level Set

📊 Changes

1 file changed (+19 additions, -24 deletions)

View changed files

📝 packages/vinext/src/shims/head.ts (+19 -24)

📄 Description

  • Introduced getValidHeadChildren to collect valid head elements for SSR, ensuring consistent validation and warning for disallowed tags in development.
  • Updated headChildToHTML to handle props and convert them to HTML strings.
  • Simplified the Head component's SSR logic to utilize the new validation function, enhancing code clarity and maintainability.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/89 **Author:** [@ygcaicn](https://github.com/ygcaicn) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 3/29/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `head` --- ### 📝 Commits (4) - [`32e6cc2`](https://github.com/cloudflare/vinext/commit/32e6cc2960f91580f0765765607e3e23e3926f92) refactor(head): improve SSR head management and validation - [`d6890a8`](https://github.com/cloudflare/vinext/commit/d6890a84a3f8d8ed20cd4066210605c5ae4a1f3a) Merge remote-tracking branch 'origin/main' into ygcaicn-head - [`397f139`](https://github.com/cloudflare/vinext/commit/397f139a3c45be64c4c6aef8f0c97f1360ff90ac) refactor(head): remove redundant ALLOWED_HEAD_TAGS guard in headChildToHTML - [`b7e9e16`](https://github.com/cloudflare/vinext/commit/b7e9e16fc02ae45f405e996ebebc17fc77e8b04e) refactor(head): hoist rawContentTags to module-level Set ### 📊 Changes **1 file changed** (+19 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/shims/head.ts` (+19 -24) </details> ### 📄 Description - Introduced `getValidHeadChildren` to collect valid head elements for SSR, ensuring consistent validation and warning for disallowed tags in development. - Updated `headChildToHTML` to handle props and convert them to HTML strings. - Simplified the `Head` component's SSR logic to utilize the new validation function, enhancing code clarity and maintainability. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:03 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#299
No description provided.