diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index 13c053a3ca..6c58b90e64 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -22,7 +22,7 @@ import type { HeadEntryOptions } from '@unhead/schema' import { defineRenderHandler, getRouteRules, useRuntimeConfig, useStorage } from '#internal/nitro' import { useNitroApp } from '#internal/nitro/app' -import type { Link, Script } from '@unhead/vue' +import type { Link, Script, Style } from '@unhead/vue' import { createServerHead } from '@unhead/vue' // @ts-expect-error virtual file import unheadPlugins from '#internal/unhead-plugins.mjs' @@ -349,12 +349,12 @@ export default defineRenderHandler(async (event): Promise ({ rel: 'stylesheet', href: renderer.rendererContext.buildAssetsURL(resource.file) }) - ), - style: inlinedStyles + ) }, headEntryOptions) if (!NO_SCRIPTS) { @@ -495,7 +495,7 @@ function renderHTMLDocument (html: NuxtRenderHTMLContext) { ` } -async function renderInlineStyles (usedModules: Set | string[]) { +async function renderInlineStyles (usedModules: Set | string[]): Promise { const styleMap = await getSSRStyles() const inlinedStyles = new Set() for (const mod of usedModules) {