chore: export from app

This commit is contained in:
harlan 2025-01-21 17:13:35 +11:00
parent d6913598f0
commit 46499f7049
3 changed files with 5 additions and 5 deletions

View File

@ -41,10 +41,6 @@ export default defineNuxtModule<NuxtOptions['unhead']>({
const exportPath = resolve(runtimeDir, 'exports', isNuxtV4 ? 'v4' : 'v3') const exportPath = resolve(runtimeDir, 'exports', isNuxtV4 ? 'v4' : 'v3')
nuxt.options.alias['#unhead/exports'] = exportPath 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 // for Nuxt v3 users we will alias `@unhead/vue` to our custom export path so that
// import { useHead } from '@unhead/vue' // import { useHead } from '@unhead/vue'

View File

@ -6,7 +6,7 @@ export {
useServerHead, useServerHead,
useServerHeadSafe, useServerHeadSafe,
useServerSeoMeta, useServerSeoMeta,
} from '#app' } from '#app/composables/head'
export { export {
createHeadCore, createHeadCore,

View File

@ -113,6 +113,10 @@ const granularAppPresets: InlinePreset[] = [
imports: ['useRuntimeHook'], imports: ['useRuntimeHook'],
from: '#app/composables/runtime-hook', from: '#app/composables/runtime-hook',
}, },
{
imports: ['useHead', 'useHeadSafe', 'useServerHeadSafe', 'useServerHead', 'useSeoMeta', 'useServerSeoMeta', 'injectHead'],
from: '#app/composables/head',
},
] ]
export const scriptsStubsPreset = { export const scriptsStubsPreset = {