NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Latest stable
3.5.4
Last release 2 days ago
28 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
245 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
validate : Ignore percent-encoded sequences in param checks - by @harlan-zw in #1167 (a24a5)
bundler : Fall back to json parse when raw transfer allocation fails - by @danielroe in #1160 (506b1)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
unhead : Keep useHeadSafe titles out of app scripts and directives - by @harlan-zw in #1154 (3ed7b)
Accept Vue reactive array inputs - by @harlan-zw in #1143 (20e97)
Unhead 3.5 focuses on performance and correctness, especially when the browser picks up where the server left off.
Unhead 3.5 focuses on performance and correctness, especially when the browser picks up where the server left off.
A page can arrive with a large inline stylesheet that Unhead never needs to update. Unhead now skips building a lookup key from that CSS unless a client tag needs it. That made first hydration 23% faster in our Nuxt-style benchmark. Benchmark results
If the server already rendered all head tags your page needs, you can try the experimental lazy head. It queues changes until you call head.load(). It’s available for Vue, React, Svelte, Solid and vanilla JavaScript. Lazy head API
This work also opens the door to compiled mode. That’s an opt-in approach we’re exploring for a future release, where the build prepares head tags ahead of time.
bundler : Build Unhead DevTools on Devframe - by @harlan-zw in #1003 (41601)
Register the runtime plugin only once - by @Noumenon-ai and Noumenon-ai in #990 (de2d3)
Inject resolved path for devtools runtime plugin - by @danielroe in https://github.com/unjs/unhead/issues/974 (fe51f)
transformIndexHtml() - by @harlan-zw in https://github.com/unjs/unhead/issues/970 <samp>(237d7)</samp>Render Streamed Body Tags before body close - by @harlan-zw in https://github.com/unjs/unhead/issues/960 (d253b)
Type origin-trial meta directive - by @harlan-zw in https://github.com/unjs/unhead/issues/932 (3cdea)
about links to homepage - by @harlan-zw in https://github.com/unjs/unhead/issues/933 <samp>(430b1)</samp>scripts: Support source-less SDK loaders - by @harlan-zw in https://github.com/unjs/unhead/issues/858 (36dcf)
validate: Warn on deprecated Twitter metadata - by @harlan-zw in https://github.com/unjs/unhead/issues/910 (68a50)
Projects using the Unhead Bundler with Vite 6 or 7, webpack, Rspack, Rollup, or another build without Rolldown no longer receive oxc-parser from @unhead/bundler. Builds that use Unhead transforms must install it directly.
pnpm add -D oxc-parser
Runtime-only Unhead projects and builds with Rolldown installed need no change.
schema-org: Keep logo on organization identity - by @harlan-zw in https://github.com/unjs/unhead/issues/872 (13324)
schema-org: Improve resolver correctness and types - by @harlan-zw in https://github.com/unjs/unhead/issues/868 (230e4)
bundler: Preserve head.ssr mutation targets - by @harlan-zw in https://github.com/unjs/unhead/issues/866 (e8ef3)
Add async readiness and consumer scopes - by @harlan-zw in https://github.com/unjs/unhead/issues/840 (bbdc1)
prepareTemplate - by @harlan-zw in https://github.com/unjs/unhead/issues/830 <samp>(0b8ca)</samp>types: Allow media on icon links - by @harlan-zw in https://github.com/unjs/unhead/issues/821 (ce57f)
media on icon links - by @harlan-zw in https://github.com/unjs/unhead/issues/821 <samp>(ce57f)</samp>Guard plugins against double registration - by @harlan-zw in https://github.com/unjs/unhead/issues/791 (2bb78)
bundler: Add further transform hook filters - by @TheAlexLichter in https://github.com/unjs/unhead/issues/783 (24704)
vue: Return a no-op entry from clientUseHead when the scope is dead - by @williamchong and William Chong in https://github.com/unjs/unhead/issues/778
Resolve dynamic ogImage in useSeoMeta transform - by @harlan-zw in https://github.com/unjs/unhead/issues/770 (06a85)
music.radio_station + add payment.link OG - by @harlan-zw in https://github.com/unjs/unhead/issues/775 <samp>(80027)</samp>bundler: Resolve devtools bridge and UI assets from package root - by @harlan-zw in https://github.com/unjs/unhead/issues/768 (78bcb)
server: Re-expose omitLineBreaks render option - by @harlan-zw in https://github.com/unjs/unhead/issues/767 (95604)
omitLineBreaks render option - by @harlan-zw in https://github.com/unjs/unhead/issues/767 <samp>(95604)</samp>Scope alternate link dedupeKey by href when type is used - by @EduardF1 in https://github.com/unjs/unhead/issues/759 (e8699)
migrate Apply autofixes for v2-to-v3 migration: rewrite deprecated props and wrap tag literals in defineX helpers. validate-html Run the runtime Valid…
To assist with migrations and overall DX a CLI has been introduced: @unhead/cli.
npx -y @unhead/cli
It lets you do the following:
audit Lint your codebase for unhead misuse, type-narrowing issues, and SEO/perf foot-guns.
migrate Apply autofixes for v2-to-v3 migration: rewrite deprecated props and wrap tag literals in defineX helpers.
validate-html Run the runtime ValidatePlugin over prerendered HTML files (e.g. dist/, .output/, build/).
validate-url Fetch a rendered URL and run unhead\'s SEO/perf validation rules over its <head>.
For example, try running audit on your own project for hints on how to improve your SEO.
Knowing that your useHead() and useSeoMeta() code is right while your coding is important. While type-narrowing solves many broken cases, we introduce an ESLint plugin to help catch anything that the typechecker can't catch.
These rules are shared from the runtime ValidatePlugin
# flat-config ESLint plugin with v2→v3 migration autofixes
npm i -D @unhead/eslint-plugin
```ts [eslint.config.ts]
import { configs } from '@unhead/eslint-plugin'
export default [
configs.recommended,
]
The streaming plugin lived only at unhead/stream/vite previously, leaving non-Vite users with no way to wire the bootstrap. The plugin is now a bundler-agnostic unplugin factory with first-class webpack and Vite entries, and the framework packages compose it behind Unhead({ streaming: true }).
// vite.config.ts
import { Unhead } from '@unhead/vue/vite'
export default { plugins: [vue(), Unhead({ streaming: true })] }
// webpack.config.ts
import { Unhead } from '@unhead/vue/bundler'
export default { plugins: [...Unhead({ streaming: true }).webpack()] }
Streaming also gains a nonce option (forwarded on every injected <script> for CSP support), a fixed async mode for production Vite builds (the IIFE is now emitted via this.emitFile() so the script src references a real hashed asset), a dev-mode warning when the client IIFE runs against an empty server queue, and a shared StreamingGlobal type so the server bootstrap, client, and injected IIFE agree on the shape of window.__unhead__. Default mode changed from async to inline for smaller TTFB.
Preserve useSeoMeta import when sibling call is untransformable - by @harlan-zw (8ea48)
types: Missing rel sitemap, amphtml, hub, apple-touch-startup-image - by @harlan-zw in https://github.com/unjs/unhead/issues/744 (578da)
rel sitemap, amphtml, hub, apple-touch-startup-image - by @harlan-zw in https://github.com/unjs/unhead/issues/744 <samp>(578da)</samp>Disable SSRStaticReplace in vite dev mode - by @harlan-zw in https://github.com/unjs/unhead/issues/739 (13121)
types: Accept readonly and as const inputs - by @harlan-zw in https://github.com/unjs/unhead/issues/736 (5ccf9)
Proper script importmap & speculationrules handling - by @harlan-zw in https://github.com/unjs/unhead/issues/734 (8027f)
importmap & speculationrules handling - by @harlan-zw in https://github.com/unjs/unhead/issues/734 <samp>(8027f)</samp>…package; the old name still works with a deprecation warning).
Unhead v3 rebuilds the rendering engine from the ground up. The motivation: streaming SSR. Frameworks like Nuxt, SolidStart, and SvelteKit stream HTML to the browser as data loads, but head tags were still stuck in a request/response model, resolved once and never updated. To fix this properly, we had to make rendering synchronous, pluggable, and side-effect free. The result is a faster, smaller, and more capable head manager.
Head tags now update dynamically as suspense boundaries resolve during streaming. As each chunk streams to the browser, new <title>, <meta>, and <link> tags are pushed to a client-side queue and applied to the DOM. No waiting for the full page to load.
// entry-server.ts
import { createStreamableHead } from '@unhead/vue/stream/server'
const { head, wrapStream } = createStreamableHead()
app.use(head)
// wraps the Vue stream, injecting head updates as chunks resolve
return wrapStream(renderToWebStream(app), template)
// entry-client.ts
import { createStreamableHead } from '@unhead/vue/stream/client'
const head = createStreamableHead()
app.use(head)
Under the hood: a queue stub (window.__unhead__) collects head entries as they stream in before the main JS bundle loads. Once the client head instance initializes, it processes the queue and takes over. No entries are ever lost regardless of timing.
Streaming is supported for Vue, React, Solid.js, Svelte, and vanilla TypeScript. See PR #537.
A single @unhead/{framework}/vite plugin replaces the old manual composition of @unhead/addons + streaming plugin + framework glue. One import, one call, and you get tree-shaking, useSeoMeta → useHead transform, inline minification, streaming SSR, dev-mode ValidatePlugin auto-injection, and Vite DevTools integration.
// vite.config.ts
import { Unhead } from '@unhead/vue/vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue(), Unhead()],
})
The DevTools panel surfaces live head state during development: every useHead() / useSeoMeta() call with its source file and line number, resolved tags, SEO overview (title, description, canonical, Open Graph), useScript() load status, active plugins, template params, and warnings from the Validate plugin. Source tracing lets you click through from any tag back to the exact line that created it.
Available for Vue, React, Svelte, Solid, and vanilla via @unhead/bundler/vite (the renamed @unhead/addons package; the old name still works with a deprecation warning).
useHead() Type NarrowinguseHead() now narrows types based on input. Link, script, and meta tags resolve to specific subtypes instead of a generic union, so you get precise autocomplete and type errors when something is wrong.
useHead({
link: [
// Narrows to StylesheetLink: requires href, offers media, integrity, etc.
{ rel: 'stylesheet', href: '/styles.css' },
// Narrows to PreloadLink: requires as attribute
{ rel: 'preload', as: 'font', href: '/font.woff2', crossorigin: 'anonymous' },
],
script: [
// Narrows to ModuleScript
{ src: '/app.mjs', type: 'module' },
// Narrows to JsonLdScript
{ type: 'application/ld+json', innerHTML: '{}' },
],
})
New optional ValidatePlugin that inspects resolved head output and warns about common mistakes: missing titles, duplicate meta tags, contradictory preload priorities, render-blocking scripts, late <meta charset>, too many fetchpriority="high" hints, preconnect without crossorigin, and more. Also includes v2 migration rules that detect deprecated property names (children, hid/vmid, body: true), missing TemplateParamsPlugin, and missing AliasSortingPlugin — all of which cause silent breakage on upgrade. Auto-injected in dev by the unified Vite plugin so warnings surface in the browser console without any manual setup. Fully tree-shakeable. Rules use ESLint-style flat config:
import { ValidatePlugin } from 'unhead/plugins'
createHead({
plugins: [
ValidatePlugin({
rules: {
'missing-description': 'off',
}
})
]
})
See PRs #690, #691, #716, #722, #725, #732.
New built-in CanonicalPlugin that auto-generates <link rel="canonical"> tags and resolves relative URLs to absolute in og:image, twitter:image, and og:url. Includes query parameter filtering (strips tracking params like utm_source, fbclid, gclid by default), trailing slash normalization, and automatic hash fragment stripping. Essential for SEO and social sharing.
import { CanonicalPlugin } from 'unhead/plugins'
createHead({
plugins: [
CanonicalPlugin({
canonicalHost: 'https://mysite.com',
trailingSlash: true,
queryWhitelist: ['page', 'sort'],
})
]
})
New optional MinifyPlugin that minifies inline <script> and <style> tag content during SSR. Uses lightweight pure-JS minifiers with zero native dependencies, safe for edge and serverless runtimes. A companion build-time transform (MinifyTransform in @unhead/bundler) pre-minifies static innerHTML literals at compile time. Standalone utilities (minifyJS, minifyCSS, minifyJSON) are also available via unhead/minify.
import { MinifyPlugin } from 'unhead/plugins'
createHead({
plugins: [MinifyPlugin()]
})
See PR #705.
| Build | v3 size | v2 size | Delta gz |
|---|---|---|---|
| client | 10254 | 11513 | -534 (-11.2%) |
| server | 9894 | 10361 | -194 (-4.6%) |
| vueClient | 11323 | 12567 | -533 (-10.2%) |
| vueServer | 10849 | 11312 | -191 (-4.1%) |
| Benchmark | v2 mean | v3 mean | Delta |
|---|---|---|---|
| @unhead/vue | 0.106ms | 0.072ms | 32% faster |
| core | 0.088ms | 0.073ms | 17% faster |
Key optimizations:
estree-walker/acorn-loose to oxc-walker (#663)transformHtmlTemplate (#581)TemplateParamsPlugin and AliasSortingPlugin made opt-in for smaller bundles (#493, #494)Dataset, MusicAlbum, MusicGroup, MusicPlaylist, MusicRecording, PodcastEpisode, PodcastSeason, PodcastSeries, Service, TVEpisode, TVSeason, TVSeries (#612)ohash and defu dependencies (#605)renderDOMHead() / renderSSRHead() are now fully synchronous, single-pass via a composable resolveTags() pipeline; the head instance exposes a pluggable render() function for framework integrations (#619, #622, #628, #629, #630)@unhead/react/helmet drop-in compat export for users migrating from react-helmet (#719)useHeadSafe() now whitelists CSS styles (#491)blocking attribute on scripts and stylesheets (#489)useScript() consolidated back into core, legacy support dropped (#498)fediverse:creator meta tag support (#703)hookable to lighter HookableCore with sync-only hooks (#631)@unhead/schema, @unhead/shared) (#678)templateParams extensible via module augmentation (#679)twitter:card in InferSeoMetaPlugin (#681)as attribute for preload links (#683)onRendered callback option on useHead() for synchronizing with DOM head updates (#712)tagWeight option on createHead() to override default CAPO tag weight function (#716)<link rel="alternate"> correctly (#655, #656, #658)@unhead/vue/stream/iife with correct types (#707)null to opt out of default values (#680)target to array before merging potentialAction (#709)titleTemplate tag in resolveTitleTemplate (#715)renderDOMHead() and renderSSRHead() no longer return promises. Remove await.
@unhead/addons → @unhead/bundler (#726, #733)The @unhead/addons package has been renamed to @unhead/bundler (the old name still works with a deprecation warning). Framework Vite plugins now use a named Unhead export and ship from each framework's /vite subpath:
- import unhead from '@unhead/addons/vite'
+ import { Unhead } from '@unhead/vue/vite'
// or @unhead/react/vite, @unhead/svelte/vite, @unhead/solid-js/vite
export default defineConfig({
- plugins: [unhead()],
+ plugins: [Unhead()],
})
Link / Script / Meta types (#729)Link and Script unions no longer fall back to GenericLink / GenericScript, so the type system enforces per-tag constraints (e.g. preload + as: 'font' requires crossorigin). Meta content is now required; use content: null explicitly to remove a meta tag. Custom rel / type values need satisfies GenericLink / satisfies GenericScript.
| Old | New |
|---|---|
children |
innerHTML |
hid / vmid |
key |
body: true |
tagPosition: 'bodyClose' |
useServerHead / useServerSeoMeta |
useHead / useSeoMeta |
createHeadCore |
createUnhead |
@unhead/vue/legacy |
@unhead/vue/client or @unhead/vue/server (legacy path still works with deprecation warning) |
mode option on entries |
Use client/server createHead imports |
All packages are ESM-only.
TemplateParamsPlugin and AliasSortingPlugin are no longer included by default. Import and register them explicitly if needed.
init hook removeddom:renderTag, dom:rendered hooks deprecated (will be removed in v4)dom:beforeRender is now synchronous (no async handlers)| Removed | Replacement |
|---|---|
Head |
HeadTag |
MetaFlatInput |
MetaFlat |
RuntimeMode |
Removed |
@unhead/schema |
unhead/types |
@unhead/shared |
unhead |
PluginSchemaOrg / SchemaOrgUnheadPlugin replaced with UnheadSchemaOrgcanonicalHost replaced with host, canonicalUrl replaced with host + pathAdd ValidatePlugin during your upgrade to automatically detect v2 patterns:
import { ValidatePlugin } from 'unhead/plugins'
createHead({ plugins: [ValidatePlugin()] })
It will warn about missing plugins, deprecated properties, and other common migration issues. Remove it once migration is complete. If you use the unified Vite plugin, ValidatePlugin is auto-injected in dev so you don't have to wire it up manually. See PRs #722, #733.
See the full Migration Guide for detailed upgrade instructions.
useHead() type narrowing - by @harlan-zw in https://github.com/unjs/unhead/issues/627 <samp>(e8086)</samp>renderDOMHead() - by @harlan-zw in https://github.com/unjs/unhead/issues/628 <samp>(627eb)</samp>renderSSRHead() - by @harlan-zw in https://github.com/unjs/unhead/issues/629 <samp>(44d71)</samp>render() function - by @harlan-zw in https://github.com/unjs/unhead/issues/630 <samp>(baaa7)</samp>resolveTags() - by @harlan-zw in https://github.com/unjs/unhead/issues/622 <samp>(b6a52)</samp>onRendered - by @harlan-zw and Claude Opus 4.6 (1M context) in https://github.com/unjs/unhead/issues/712 <samp>(55166)</samp>MinifyPlugin for inline script/style minification - by @harlan-zw and Claude Opus 4.6 (1M context) in https://github.com/unjs/unhead/issues/705 <samp>(f1f5d)</samp>@unhead/bundler and /vite subpath exports - by @harlan-zw in https://github.com/unjs/unhead/issues/726 <samp>(df9c8)</samp>tagWeight option and meta-beyond-1mb validation rule - by @harlan-zw and Claude Opus 4.6 (1M context) in https://github.com/unjs/unhead/issues/716 <samp>(c58be)</samp>HookableCore - by @harlan-zw in https://github.com/unjs/unhead/issues/631 <samp>(cc794)</samp>transformHtmlTemplate - by @harlan-zw <samp>(f696d)</samp>fediverse:creator meta tag support - by @harlan-zw in https://github.com/unjs/unhead/issues/703 <samp>(545c9)</samp>target to array before merging potentialAction - by @harlan-zw and Claude Opus 4.6 (1M context) in https://github.com/unjs/unhead/issues/709 <samp>(125ef)</samp>book:release_date meta - by @harlan-zw <samp>(e413c)</samp>@unhead/vue/stream/iife with correct types - by @harlan-zw in https://github.com/unjs/unhead/issues/707 <samp>(a8f1a)</samp>Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
*No significant changes* ##### View changes on GitHub
No significant changes
*No significant changes* ##### View changes on GitHub
No significant changes
unhead : Keep useHeadSafe titles out of app scripts and directives - by @harlan-zw in #1155 (d8587)
No significant changes View changes on GitHub
No significant changes
Support value in v2 client provider - by @harlan-zw in https://github.com/unjs/unhead/issues/902 (fd875)
vue: Expose v2 legacy plugins - by @harlan-zw in https://github.com/unjs/unhead/issues/861 (3023d)
*No significant changes* ##### View changes on GitHub
No significant changes
schema-org: Normalize target to array before merging potentialAction - by @harlan-zw and Claude Opus 4.6 (1M context) in https://github.com/unjs/unhea
target to array before merging potentialAction - by @harlan-zw and Claude Opus 4.6 (1M context) in https://github.com/unjs/unhead/issues/709 <samp>(22ac9)</samp>Harden prototype pollution - by @harlan-zw (a6ed9)
Fixed XSS bypass in useHeadSafe via attribute name injection (GHSA-g5xx-pwrp-g3fv). Users handling untrusted input with useHeadSafe should upgrade imm
solid-js: Correct peerDependency version - by @tyeporter in https://github.com/unjs/unhead/issues/671 (64e17)
schema-org: Nuxt test utils compat bug - by @harlan-zw (ef838)
schema-org: Avoid crashing from 3+ duplicate nodes - by @harlan-zw (4baf9)
deduplicate matching tags inside same render cycle - by @harlan-zw in https://github.com/unjs/unhead/issues/668 (5c0b2)
react: Ssr regression - by @harlan-zw (6adff)
react: Dispose head entries on unmount in React 18 StrictMode - by @harlan-zw in https://github.com/unjs/unhead/issues/664 (50ffe)
useScript - by @cernymatej in https://github.com/unjs/unhead/issues/660 <samp>(e8f5b)</samp>schema-org: Remove unimplemented SchemaOrgDebug - by @onmax in https://github.com/unjs/unhead/issues/649 (642dc)
<link rel="alternate"> by hreflang/type only, drop href from key - by @harlan-zw in https://github.com/unjs/unhead/issues/656 <samp>(86175)</samp>One column per quarter.