diff --git a/plugins/speculationrules.ts b/plugins/speculationrules.ts index c90c11dc7..d81239b9c 100644 --- a/plugins/speculationrules.ts +++ b/plugins/speculationrules.ts @@ -3,21 +3,20 @@ export default defineNuxtPlugin(() => { script: [ { type: 'speculationrules', - innerHTML: ` -{ - "prerender": [ - { - "where": { - "and": [ - { "href_matches": "/*" }, - { "not": { "selector_matches": ".no-prerender" } }, - { "not": { "selector_matches": "[rel~=nofollow]" } } - ] - } - } - ], - "eagerness": "moderate" -}`, + innerHTML: JSON.stringify({ + prerender: [ + { + where: { + and: [ + { href_matches: "/*" }, + { not: { selector_matches: ".no-prerender" } }, + { not: { selector_matches: "[rel~=nofollow]" } } + ] + } + } + ], + eagerness: "moderate", + }), }, ], });