From 4b4558c2be6f6a8bb4059c8ecd3122754fd313ae Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Thu, 15 Sep 2022 14:20:16 +0200 Subject: [PATCH] fix(nuxt): remove modulepreload for spa fallback routes with `ssr:true` (#7553) --- packages/nuxt/src/core/runtime/nitro/renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,