fix(nuxt): omit rendering payload prefetch when `noScripts` (#27972)

This commit is contained in:
Daniel Roe 2024-07-03 06:59:05 +01:00 committed by GitHub
parent 3c635034a1
commit 8e2c2263fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ export default defineRenderHandler(async (event): Promise<Partial<RenderResponse
// Setup head
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext)
// 1.Extracted payload preloading
if (_PAYLOAD_EXTRACTION && !isRenderingIsland) {
if (_PAYLOAD_EXTRACTION && !NO_SCRIPTS && !isRenderingIsland) {
head.push({
link: [
process.env.NUXT_JSON_PAYLOADS