diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts
index 561eb0f068..1cdcd93354 100644
--- a/packages/nuxt/src/core/runtime/nitro/renderer.ts
+++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts
@@ -194,7 +194,7 @@ export default defineRenderHandler(async (event) => {
htmlAttrs: normalizeChunks([renderedMeta.htmlAttrs]),
head: normalizeChunks([
renderedMeta.headTags,
- !process.env.NUXT_NO_SCRIPTS && process.env.prerender ? `` : null,
+ (process.env.prerender && !ssrContext.noSSR) ? `` : null,
_rendered.renderResourceHints(),
_rendered.renderStyles(),
inlinedStyles,