v7.0.0
Introduction
Nuxt Schema.org v7 requires Nuxt 4.6. It drops Nuxt 3, Unhead 2, and Nuxt Content v2.
V7 ships in Nuxt SEO v6. If you use @nuxtjs/seo v6, you already have it.
Most apps need no code changes. Upgrade Nuxt first, then follow the migration steps.
Breaking Changes
Nuxt 4.6, Node 22, and Unhead 3.4
V7 requires Nuxt ^4.6.0 || ^5.0.0. Nuxt 3 is no longer supported. (#170)
| Dependency | v6 | v7 |
|---|---|---|
| Nuxt | >=3.16.0 | ^4.6.0 || ^5.0.0 |
| Node | any | ^22.22.3 || ^24.15.0 || >=26.0.0 |
| Vue | any | ^3.5.0 |
unhead, @unhead/vue | ^2.0.7 || ^3.0.0, optional | ^3.4.2 |
Nuxt 4.6 already depends on @unhead/vue 3.4.2 or later. The module now vendors only the Unhead 3 Schema.org graph.
Site Config v5
Nuxt Schema.org now requires Nuxt Site Config v5. The module installs it for you. (#170, #181)
If your app depends on nuxt-site-config directly, upgrade it to v5. Read the Site Config v5 breaking changes.
Nuxt Content v2 Removed
V7 supports Nuxt Content v3 and comark-content. It removes the Nuxt Content v2 integration. (#182)
If your app uses Nuxt Content v2, Nuxt stops at startup with a version error. Upgrade to Nuxt Content v3, then add defineSchemaOrgSchema() to your collection. The Nuxt Content guide shows the schema.
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { defineSchemaOrgSchema } from 'nuxt-schema-org/content'
import { z } from 'zod'
export default defineContentConfig({
collections: {
content: defineCollection({
type: 'page',
source: '**/*.md',
schema: z.object({
schemaOrg: defineSchemaOrgSchema(),
head: z.object({
meta: z.array(z.record(z.string(), z.any())).optional(),
script: z.array(z.record(z.string(), z.any())).optional(),
}).optional(),
}),
}),
},
})Runtime Aliases
V7 registers three aliases: #schema-org/app, #schema-org/server, and #schema-org/types. It removes the #schema-org alias for the whole runtime directory. Paths outside the three aliases, such as #schema-org/utils/content, no longer resolve. (#170)
Import from the entry points instead of deep paths:
// Deep path: still resolves, but depends on the file layout
import { useSchemaOrg } from '#schema-org/app/composables/useSchemaOrg'
// Entry point
import { useSchemaOrg } from '#schema-org/app'Auto-imports do not change.
DevTools Host Package
The Schema.org DevTools panel moved to an optional package. If you use the panel, install the host module:
pnpm add -D nuxtseo-devtools-host@^1Restart your development server after installation. The module loads the host automatically. You do not need to add it to modules.
Client Bundle Without Reactive Mode
With reactive: false, the client bundle no longer includes useSchemaOrg(), the define*() functions, or the Schema.org components. On the client, the components render only their default slot. (#175)
reactive defaults to false in production SSR builds. Server rendered JSON-LD does not change.
If your app updates the graph from client code, enable reactive mode:
export default defineNuxtConfig({
schemaOrg: {
reactive: true,
},
})Migration
- Upgrade Nuxt to 4.6+ or 5. Upgrade Node to 22.22.3+, 24.15.0+, or 26+.
- If you use Nuxt Content v2, upgrade to Nuxt Content v3.
- If you depend on
nuxt-site-configdirectly, upgrade it to v5. - If a
#schema-orgimport no longer resolves, import from#schema-org/app,#schema-org/server, or#schema-org/types. - If you use the DevTools panel, install
nuxtseo-devtools-host. - If client code updates the graph, set
schemaOrg: { reactive: true }.
Features
Typed Runtime Entry Points
#schema-org/app exports useSchemaOrg() and every define*() function. #schema-org/server exports useSchemaOrgConfig(). (#170)
import { defineArticle, useSchemaOrg } from '#schema-org/app'
useSchemaOrg([
defineArticle({ headline: 'Nuxt Schema.org v7' }),
])Smaller Client Bundle
Production SSR builds now remove useSchemaOrg(), the define*() functions, and the Schema.org components from the client bundle. In v6, the tree-shaking keys did not match the injected imports, so this code stayed in the bundle. Thanks to @danielroe for the fix. (#175)
Smaller Package
The package vendors one Schema.org graph instead of two. The unpacked package drops from 1,536,491 bytes in v6.4.3 to 1,207,585 bytes at commit 7c93339, 21% smaller. pkg-types is no longer a dependency.
Bug Fixes
Nullable Frontmatter Properties
A null value inside schemaOrg frontmatter no longer throws during the content build. (#176)
Site Config Dependency
V6 declared Site Config in meta.moduleDependencies, which Nuxt does not read. V7 declares it in the top-level moduleDependencies, so Nuxt installs and checks it. (#181)