[{"data":1,"prerenderedAt":285},["ShallowReactive",2],{"navigation":3,"-guide-nuxt":48,"-guide-nuxt-surround":280},[4],{"title":5,"path":6,"stem":7,"children":8,"icon":47},"Guide","\u002Fguide","1.guide\u002F1.index",[9,12,17,22,27,32,37,42],{"title":10,"path":6,"stem":7,"icon":11},"Getting started","i-lucide-rocket",{"title":13,"path":14,"stem":15,"icon":16},"Nuxt","\u002Fguide\u002Fnuxt","1.guide\u002F2.nuxt","i-logos-nuxt-icon",{"title":18,"path":19,"stem":20,"icon":21},"Next.js","\u002Fguide\u002Fnext","1.guide\u002F3.next","i-logos-nextjs-icon",{"title":23,"path":24,"stem":25,"icon":26},"How it works","\u002Fguide\u002Fhow-it-works","1.guide\u002F4.how-it-works","i-lucide-workflow",{"title":28,"path":29,"stem":30,"icon":31},"Options","\u002Fguide\u002Foptions","1.guide\u002F5.options","i-lucide-settings",{"title":33,"path":34,"stem":35,"icon":36},"API","\u002Fguide\u002Fapi","1.guide\u002F6.api","i-lucide-code",{"title":38,"path":39,"stem":40,"icon":41},"Privacy","\u002Fguide\u002Fprivacy","1.guide\u002F7.privacy","i-lucide-lock",{"title":43,"path":44,"stem":45,"icon":46},"Benchmarks","\u002Fguide\u002Fbenchmarks","1.guide\u002F8.benchmarks","i-lucide-gauge","i-lucide-book-open",{"id":49,"title":13,"body":50,"description":274,"extension":275,"meta":276,"navigation":277,"path":14,"seo":278,"stem":15,"__hash__":279},"content\u002F1.guide\u002F2.nuxt.md",{"type":51,"value":52,"toc":267,"icon":16},"minimark",[53,58,62,90,111,126,130,207,217,232,236,249,253,256,260,263],[54,55,57],"h2",{"id":56},"install","Install",[59,60],"pm-x",{"command":61},"nuxt module add nuxt-precog",[63,64,70],"pre",{"className":65,"code":66,"filename":67,"language":68,"meta":69,"style":69},"language-sh shiki shiki-themes github-light github-dark github-dark","TYPESAFE_API_KEY=\"your-api-key\"\n",".env","sh","",[71,72,73],"code",{"__ignoreMap":69},[74,75,78,82,86],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"slsVL","TYPESAFE_API_KEY",[74,83,85],{"class":84},"so5gQ","=",[74,87,89],{"class":88},"sfrk1","\"your-api-key\"\n",[91,92,93,94,101,102,105,106,110],"p",{},"Using a ",[95,96,100],"a",{"href":97,"rel":98},"https:\u002F\u002Fvercel.com\u002Fdocs\u002Fai-gateway",[99],"nofollow","Vercel AI Gateway"," key instead? Name it\n",[71,103,104],{},"AI_GATEWAY_API_KEY"," and the module routes through the gateway on its own. The two are not\ninterchangeable; see ",[95,107,109],{"href":108},"\u002Fguide\u002Foptions#the-api-key","the API key",".",[91,112,113,114,117,118,122,123,110],{},"That is the whole setup. The defaults prefetch at most three links and never prerender. Run\n",[71,115,116],{},"nuxt dev",", open a page and press ",[119,120,121],"kbd",{},"Shift","+",[119,124,125],{},"P",[54,127,129],{"id":128},"let-it-prerender-as-well","Let it prerender as well",[63,131,136],{"className":132,"code":133,"filename":134,"language":135,"meta":69,"style":69},"language-ts shiki shiki-themes github-light github-dark github-dark","export default defineNuxtConfig({\n  modules: [\"nuxt-precog\"],\n  precog: {\n    mode: \"auto\",\n    takeOverNuxtLinkPrefetch: true,\n  },\n});\n","nuxt.config.ts","ts",[71,137,138,153,165,171,183,195,201],{"__ignoreMap":69},[74,139,140,143,146,150],{"class":76,"line":77},[74,141,142],{"class":84},"export",[74,144,145],{"class":84}," default",[74,147,149],{"class":148},"shcOC"," defineNuxtConfig",[74,151,152],{"class":80},"({\n",[74,154,156,159,162],{"class":76,"line":155},2,[74,157,158],{"class":80},"  modules: [",[74,160,161],{"class":88},"\"nuxt-precog\"",[74,163,164],{"class":80},"],\n",[74,166,168],{"class":76,"line":167},3,[74,169,170],{"class":80},"  precog: {\n",[74,172,174,177,180],{"class":76,"line":173},4,[74,175,176],{"class":80},"    mode: ",[74,178,179],{"class":88},"\"auto\"",[74,181,182],{"class":80},",\n",[74,184,186,189,193],{"class":76,"line":185},5,[74,187,188],{"class":80},"    takeOverNuxtLinkPrefetch: ",[74,190,192],{"class":191},"suiK_","true",[74,194,182],{"class":80},[74,196,198],{"class":76,"line":197},6,[74,199,200],{"class":80},"  },\n",[74,202,204],{"class":76,"line":203},7,[74,205,206],{"class":80},"});\n",[91,208,209,212,213,216],{},[71,210,211],{},"takeOverNuxtLinkPrefetch"," turns off ",[71,214,215],{},"NuxtLink","'s viewport prefetch and leaves prefetch on\ninteraction alone, so precog decides ahead of the cursor and Nuxt still covers the moment it\nlands.",[218,219,220],"warning",{},[91,221,222,223,226,227,231],{},"A prerendered page runs its JavaScript: analytics fire, ",[71,224,225],{},"onMounted"," fetches run, media can\nautoplay. Read ",[95,228,230],{"href":229},"\u002Fguide\u002Fhow-it-works#prerendering-has-side-effects","prerendering has side effects","\nfirst.",[54,233,235],{"id":234},"what-it-warms","What it warms",[91,237,238,241,242,245,246,110],{},[71,239,240],{},"preloadPayload"," and ",[71,243,244],{},"preloadRouteComponents"," for the routes the model picked. The payload is\nthe part that matters, and it only exists for prerendered routes with\n",[71,247,248],{},"experimental.payloadExtraction",[54,250,252],{"id":251},"devtools","DevTools",[91,254,255],{},"A tab with live metrics, the current plan, the ranking with reasons, and buttons that pause,\nresume and re-predict in the page. Development only.",[54,257,259],{"id":258},"coming-from-020","Coming from 0.2.0",[91,261,262],{},"Nothing to do beyond upgrading. The package keeps its name, its options and its behaviour; the\nworkspace split happened underneath it.",[264,265,266],"style",{},"html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}",{"title":69,"searchDepth":155,"depth":155,"links":268},[269,270,271,272,273],{"id":56,"depth":155,"text":57},{"id":128,"depth":155,"text":129},{"id":234,"depth":155,"text":235},{"id":251,"depth":155,"text":252},{"id":258,"depth":155,"text":259},"nuxt-precog is a Nuxt module. Add it, set a key, and press Shift+P.","md",{"icon":16},{"title":13,"icon":16},{"title":13,"description":274},"_wvBOje45G53bfHEjCtfeLJndK_jCRGX5kTqhqPzwJY",[281,283],{"title":10,"path":6,"stem":7,"description":282,"icon":11,"children":-1},"Ask TypeSafe Jev which link a visitor is about to click, then warm\nexactly that navigation.",{"title":18,"path":19,"stem":20,"description":284,"icon":21,"children":-1},"next-precog is a route handler plus a provider, for the App Router.",1789942050299]