mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
perf(nuxt): use static import of @unhead/ssr
(#9826)
This commit is contained in:
parent
65860d327d
commit
da6fa9ab44
@ -1,4 +1,5 @@
|
||||
import { createHead, useHead } from '@vueuse/head'
|
||||
import { renderSSRHead } from '@unhead/ssr'
|
||||
import { defineNuxtPlugin } from '#app'
|
||||
// @ts-expect-error untyped
|
||||
import { appHead } from '#build/nuxt.config.mjs'
|
||||
@ -29,7 +30,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
|
||||
if (process.server) {
|
||||
nuxtApp.ssrContext!.renderMeta = async () => {
|
||||
const { renderSSRHead } = await import('@unhead/ssr')
|
||||
const meta = await renderSSRHead(head.unhead)
|
||||
return {
|
||||
...meta,
|
||||
|
Loading…
Reference in New Issue
Block a user