Skip to content

Releases: unjs/unhead

v3.1.4

12 Jun 05:36
Immutable release. Only release title and notes can be modified.
8ad3644

Choose a tag to compare

   🐞 Bug Fixes

   🏎 Performance

  • unhead: Skip defensive tag clones when no mutating hooks registered  -  by @harlan-zw in #776 (032f2)
    View changes on GitHub

v3.1.3

05 Jun 06:30
Immutable release. Only release title and notes can be modified.
44b8ed2

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v3.1.2

05 Jun 05:50
Immutable release. Only release title and notes can be modified.
ce7f616

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v3.1.1

27 May 05:22
Immutable release. Only release title and notes can be modified.
98f99fe

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v2.1.15

08 May 15:03
Immutable release. Only release title and notes can be modified.
b4817ec

Choose a tag to compare

No significant changes

    View changes on GitHub

v2.1.14

08 May 14:58
Immutable release. Only release title and notes can be modified.
64d8bf4

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v3.1.0

27 Apr 00:51
Immutable release. Only release title and notes can be modified.
914d05e

Choose a tag to compare

🛠️ Unhead CLI

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.

✔️ Unhead ESLint

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,
]

🌊 Streaming SSR non-Vite support

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.

Changelog

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v3.0.5

22 Apr 15:24
Immutable release. Only release title and notes can be modified.
ea54e36

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v3.0.4

14 Apr 02:13
Immutable release. Only release title and notes can be modified.
be43a70

Choose a tag to compare

   🐞 Bug Fixes

  • types: Missing rel sitemap, amphtml, hub, apple-touch-startup-image  -  by @harlan-zw in #744 (578da)
    View changes on GitHub

v3.0.3

12 Apr 05:09
Immutable release. Only release title and notes can be modified.
b44590f

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub