diff --git a/packages/nuxt/src/head/module.ts b/packages/nuxt/src/head/module.ts index 8432adda3e..be0edf37be 100644 --- a/packages/nuxt/src/head/module.ts +++ b/packages/nuxt/src/head/module.ts @@ -41,10 +41,6 @@ export default defineNuxtModule({ const exportPath = resolve(runtimeDir, 'exports', isNuxtV4 ? 'v4' : 'v3') nuxt.options.alias['#unhead/exports'] = exportPath - addImportsSources({ - from: '#app', - imports: unheadVueComposablesImports['@unhead/vue'], - }) // for Nuxt v3 users we will alias `@unhead/vue` to our custom export path so that // import { useHead } from '@unhead/vue' diff --git a/packages/nuxt/src/head/runtime/exports.ts b/packages/nuxt/src/head/runtime/exports.ts index 02e69d41c4..b0a94cef9a 100644 --- a/packages/nuxt/src/head/runtime/exports.ts +++ b/packages/nuxt/src/head/runtime/exports.ts @@ -6,7 +6,7 @@ export { useServerHead, useServerHeadSafe, useServerSeoMeta, -} from '#app' +} from '#app/composables/head' export { createHeadCore, diff --git a/packages/nuxt/src/imports/presets.ts b/packages/nuxt/src/imports/presets.ts index 40a6e557f1..8abf88a90f 100644 --- a/packages/nuxt/src/imports/presets.ts +++ b/packages/nuxt/src/imports/presets.ts @@ -113,6 +113,10 @@ const granularAppPresets: InlinePreset[] = [ imports: ['useRuntimeHook'], from: '#app/composables/runtime-hook', }, + { + imports: ['useHead', 'useHeadSafe', 'useServerHeadSafe', 'useServerHead', 'useSeoMeta', 'useServerSeoMeta', 'injectHead'], + from: '#app/composables/head', + }, ] export const scriptsStubsPreset = {