Index of every page on this site: llms.txt

v4.0.0

⚠️ Breaking Changes

🏷️ Removed Implicit Site Name Inference

Previously, site.name was automatically inferred from your package.json name field or project directory name. This caused package name leakage in public APIs (e.g., @nuxtjs/sitemap exposing internal package names).

You must now explicitly set site.name:

nuxt.config.ts
export default defineNuxtConfig({
  site: {
    name: 'My Website',
  }
})

Or via environment variable:

NUXT_SITE_NAME="My Website"

If not set, site.name will be undefined.

🔑 Removed Legacy site* Runtime Config Keys

v4 removes deprecated siteUrl, siteName, and siteDescription runtime config keys.

 export default defineNuxtConfig({
-  runtimeConfig: {
-    public: {
-      siteUrl: 'https://example.com',
-    }
-  },
+  site: {
+    url: 'https://example.com',
+  }
 })

🔄 Removed Server-Side useSiteConfig Composable

v4 removes the server-side useSiteConfig() composable to resolve auto-import name collisions between client and server composables.

Use getSiteConfig() on the server instead:

-const config = useSiteConfig(event)
+const config = getSiteConfig(event)

The client-side useSiteConfig() composable is unchanged.

🗑️ Deprecated getSiteIndexable Composable

getSiteIndexable() is deprecated. Prefer checking the indexable property directly:

-const indexable = getSiteIndexable(event)
+const { indexable } = getSiteConfig(event)

📦 Removed #internal/nuxt-site-config Barrel Export

v4 removes the legacy #internal/nuxt-site-config import path. Use the documented public APIs instead.

🏗️ Deprecated SiteConfig Type Alias

SiteConfig is deprecated as an alias for SiteConfigResolved. It still exists, but a future version will remove it. Prefer SiteConfigResolved:

-import type { SiteConfig } from 'nuxt-site-config'
+import type { SiteConfigResolved } from 'nuxt-site-config'

✨ New Features

🎯 Named Priority Constants. Site config priority levels are now exposed as named constants for better readability when setting config priorities:

import { SiteConfigPriority } from 'site-config-stack'

updateSiteConfig({
  name: 'My Site',
  _priority: SiteConfigPriority.runtime,
})

Available priorities: system, vendor, nitro, config, i18n, build, runtime.

Was this page helpful?