[{"data":1,"prerenderedAt":1548},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fen\u002Ftech\u002Fnuxt-3-ssg-prerender-strategies-build-optimization":13},{"i18nKey":4,"paths":5},"tech-007-2026-05",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Ftech\u002Fssg-leitfaden-fuer-nuxt-3","\u002Fen\u002Ftech\u002Fnuxt-3-ssg-prerender-strategies-build-optimization","\u002Fes\u002Ftech\u002Festrategias-prerender-nuxt-3","\u002Ffr\u002Ftech\u002Fstrategie-prerender-nuxt-3-optimisation-build","\u002Fit\u002Ftech\u002Fstrategie-prerender-nuxt-3","\u002Fru\u002Ftech\u002Fssg-strategii-dlya-nuxt-3","\u002Ftr\u002Ftech\u002Fnuxt-3-ssg-prerender-stratejileri-ve-build-optimizasyonu",{"_path":7,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":1542,"_id":1543,"_source":1544,"_file":1545,"_stem":1546,"_extension":1547},"tech",false,"","Nuxt 3 SSG: Prerender Strategies and Build Optimization","Static site generation with route rules, payload extraction, and incremental regeneration in Nuxt 3. Reduce 40-second builds to 8 seconds.","2026-05-21",[21,22,23,24,25],"nuxt-3","ssg","prerender","build-optimization","vue",8,"Roibase",{"type":29,"children":30,"toc":1531},"root",[31,55,62,67,80,92,112,125,131,178,480,499,506,519,689,716,729,735,740,759,828,833,851,975,980,986,999,1070,1083,1088,1094,1099,1355,1368,1384,1390,1395,1506,1511,1516,1520,1525],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36,39,46,48,53],{"type":37,"value":38},"text","Nuxt 3's static site generation (SSG) engine is fundamentally different from 2.x. With the Nitro engine come ",{"type":32,"tag":40,"props":41,"children":43},"code",{"className":42},[],[44],{"type":37,"value":45},"routeRules",{"type":37,"value":47},", ",{"type":32,"tag":40,"props":49,"children":51},{"className":50},[],[52],{"type":37,"value":23},{"type":37,"value":54}," directives, and payload extraction mechanisms that directly impact build times and runtime performance. We share strategies, tradeoffs, and measurements from reducing a 40-second build to 8 seconds on a 10,000-page e-commerce site.",{"type":32,"tag":56,"props":57,"children":59},"h2",{"id":58},"prerender-strategy-selection-matrix",[60],{"type":37,"value":61},"Prerender Strategy Selection Matrix",{"type":32,"tag":33,"props":63,"children":64},{},[65],{"type":37,"value":66},"Nuxt 3 has four main prerender strategies: full static, partial prerender, ISR hybrid, and on-demand generation. Each carries different build time, runtime cost, and cache hit rate implications.",{"type":32,"tag":33,"props":68,"children":69},{},[70,72,78],{"type":37,"value":71},"Full static (",{"type":32,"tag":40,"props":73,"children":75},{"className":74},[],[76],{"type":37,"value":77},"nitro.prerender.routes",{"type":37,"value":79},"): Renders all routes at build time and exports them as HTML. Ideal for 100-page sites; for 10,000 pages, builds can exceed 5 minutes. Plus: zero runtime, 100% CDN cache hit. Minus: every content change requires full rebuild. Unsustainable for e-commerce where product catalogs update 50 times daily.",{"type":32,"tag":33,"props":81,"children":82},{},[83,85,90],{"type":37,"value":84},"Partial prerender (via ",{"type":32,"tag":40,"props":86,"children":88},{"className":87},[],[89],{"type":37,"value":45},{"type":37,"value":91},"): Prerender critical routes (homepage, top 100 categories), handle long tail with ISR. Build time drops 90%. Example: on a 10,000-product site, prerender the first 500, cache the rest on first request. Cache miss penalty: 800ms (SSR), cache hit: 40ms (static HTML).",{"type":32,"tag":33,"props":93,"children":94},{},[95,97,102,104,110],{"type":37,"value":96},"Incremental Static Regeneration (ISR): Accomplished via ",{"type":32,"tag":40,"props":98,"children":100},{"className":99},[],[101],{"type":37,"value":45},{"type":37,"value":103}," + ",{"type":32,"tag":40,"props":105,"children":107},{"className":106},[],[108],{"type":37,"value":109},"swr\u002Fstale",{"type":37,"value":111}," on platforms like Vercel\u002FNetlify. Page enters cache after first render; when TTL expires, revalidate in background. Tradeoff: stale content risk versus build-time savings. With 24-hour TTL, you miss daily price changes but build drops to 2 seconds.",{"type":32,"tag":33,"props":113,"children":114},{},[115,117,123],{"type":37,"value":116},"On-demand (webhook-triggered via ",{"type":32,"tag":40,"props":118,"children":120},{"className":119},[],[121],{"type":37,"value":122},"server\u002Fapi",{"type":37,"value":124},"): When content changes, regenerate only that route. Lowest build time, highest orchestration complexity. You need a CMS webhook → Nitro API → route invalidation pipeline.",{"type":32,"tag":56,"props":126,"children":128},{"id":127},"granular-control-with-route-rules",[129],{"type":37,"value":130},"Granular Control with Route Rules",{"type":32,"tag":33,"props":132,"children":133},{},[134,139,141,147,149,154,155,161,162,168,170,176],{"type":32,"tag":40,"props":135,"children":137},{"className":136},[],[138],{"type":37,"value":45},{"type":37,"value":140}," in ",{"type":32,"tag":40,"props":142,"children":144},{"className":143},[],[145],{"type":37,"value":146},"nuxt.config.ts",{"type":37,"value":148}," defines a different rendering strategy per route. At this layer, directives like ",{"type":32,"tag":40,"props":150,"children":152},{"className":151},[],[153],{"type":37,"value":23},{"type":37,"value":47},{"type":32,"tag":40,"props":156,"children":158},{"className":157},[],[159],{"type":37,"value":160},"swr",{"type":37,"value":47},{"type":32,"tag":40,"props":163,"children":165},{"className":164},[],[166],{"type":37,"value":167},"isr",{"type":37,"value":169},", and ",{"type":32,"tag":40,"props":171,"children":173},{"className":172},[],[174],{"type":37,"value":175},"ssr",{"type":37,"value":177}," control per-route cache behavior.",{"type":32,"tag":179,"props":180,"children":184},"pre",{"className":181,"code":182,"language":183,"meta":16,"style":16},"language-typescript shiki shiki-themes github-dark","export default defineNuxtConfig({\n  routeRules: {\n    '\u002F': { prerender: true }, \u002F\u002F Homepage always static\n    '\u002Fproducts\u002F**': { swr: 3600 }, \u002F\u002F Products cached 1 hour\n    '\u002Fapi\u002F**': { cors: true, cache: false }, \u002F\u002F API endpoints not cached\n    '\u002Fcategory\u002F:slug': { isr: true }, \u002F\u002F ISR enabled\n  },\n  nitro: {\n    prerender: {\n      crawlLinks: true, \u002F\u002F Follow sitemap links\n      routes: ['\u002Fsitemap.xml'], \u002F\u002F Manual route definition\n      ignore: ['\u002Fadmin', '\u002Fcheckout\u002F**'], \u002F\u002F Exclude from prerender\n    },\n  },\n})\n","typescript",[185],{"type":32,"tag":40,"props":186,"children":187},{"__ignoreMap":16},[188,217,226,258,286,323,350,359,367,376,398,422,454,463,471],{"type":32,"tag":189,"props":190,"children":193},"span",{"class":191,"line":192},"line",1,[194,200,205,211],{"type":32,"tag":189,"props":195,"children":197},{"style":196},"--shiki-default:#F97583",[198],{"type":37,"value":199},"export",{"type":32,"tag":189,"props":201,"children":202},{"style":196},[203],{"type":37,"value":204}," default",{"type":32,"tag":189,"props":206,"children":208},{"style":207},"--shiki-default:#B392F0",[209],{"type":37,"value":210}," defineNuxtConfig",{"type":32,"tag":189,"props":212,"children":214},{"style":213},"--shiki-default:#E1E4E8",[215],{"type":37,"value":216},"({\n",{"type":32,"tag":189,"props":218,"children":220},{"class":191,"line":219},2,[221],{"type":32,"tag":189,"props":222,"children":223},{"style":213},[224],{"type":37,"value":225},"  routeRules: {\n",{"type":32,"tag":189,"props":227,"children":229},{"class":191,"line":228},3,[230,236,241,247,252],{"type":32,"tag":189,"props":231,"children":233},{"style":232},"--shiki-default:#9ECBFF",[234],{"type":37,"value":235},"    '\u002F'",{"type":32,"tag":189,"props":237,"children":238},{"style":213},[239],{"type":37,"value":240},": { prerender: ",{"type":32,"tag":189,"props":242,"children":244},{"style":243},"--shiki-default:#79B8FF",[245],{"type":37,"value":246},"true",{"type":32,"tag":189,"props":248,"children":249},{"style":213},[250],{"type":37,"value":251}," }, ",{"type":32,"tag":189,"props":253,"children":255},{"style":254},"--shiki-default:#6A737D",[256],{"type":37,"value":257},"\u002F\u002F Homepage always static\n",{"type":32,"tag":189,"props":259,"children":261},{"class":191,"line":260},4,[262,267,272,277,281],{"type":32,"tag":189,"props":263,"children":264},{"style":232},[265],{"type":37,"value":266},"    '\u002Fproducts\u002F**'",{"type":32,"tag":189,"props":268,"children":269},{"style":213},[270],{"type":37,"value":271},": { swr: ",{"type":32,"tag":189,"props":273,"children":274},{"style":243},[275],{"type":37,"value":276},"3600",{"type":32,"tag":189,"props":278,"children":279},{"style":213},[280],{"type":37,"value":251},{"type":32,"tag":189,"props":282,"children":283},{"style":254},[284],{"type":37,"value":285},"\u002F\u002F Products cached 1 hour\n",{"type":32,"tag":189,"props":287,"children":289},{"class":191,"line":288},5,[290,295,300,304,309,314,318],{"type":32,"tag":189,"props":291,"children":292},{"style":232},[293],{"type":37,"value":294},"    '\u002Fapi\u002F**'",{"type":32,"tag":189,"props":296,"children":297},{"style":213},[298],{"type":37,"value":299},": { cors: ",{"type":32,"tag":189,"props":301,"children":302},{"style":243},[303],{"type":37,"value":246},{"type":32,"tag":189,"props":305,"children":306},{"style":213},[307],{"type":37,"value":308},", cache: ",{"type":32,"tag":189,"props":310,"children":311},{"style":243},[312],{"type":37,"value":313},"false",{"type":32,"tag":189,"props":315,"children":316},{"style":213},[317],{"type":37,"value":251},{"type":32,"tag":189,"props":319,"children":320},{"style":254},[321],{"type":37,"value":322},"\u002F\u002F API endpoints not cached\n",{"type":32,"tag":189,"props":324,"children":326},{"class":191,"line":325},6,[327,332,337,341,345],{"type":32,"tag":189,"props":328,"children":329},{"style":232},[330],{"type":37,"value":331},"    '\u002Fcategory\u002F:slug'",{"type":32,"tag":189,"props":333,"children":334},{"style":213},[335],{"type":37,"value":336},": { isr: ",{"type":32,"tag":189,"props":338,"children":339},{"style":243},[340],{"type":37,"value":246},{"type":32,"tag":189,"props":342,"children":343},{"style":213},[344],{"type":37,"value":251},{"type":32,"tag":189,"props":346,"children":347},{"style":254},[348],{"type":37,"value":349},"\u002F\u002F ISR enabled\n",{"type":32,"tag":189,"props":351,"children":353},{"class":191,"line":352},7,[354],{"type":32,"tag":189,"props":355,"children":356},{"style":213},[357],{"type":37,"value":358},"  },\n",{"type":32,"tag":189,"props":360,"children":361},{"class":191,"line":26},[362],{"type":32,"tag":189,"props":363,"children":364},{"style":213},[365],{"type":37,"value":366},"  nitro: {\n",{"type":32,"tag":189,"props":368,"children":370},{"class":191,"line":369},9,[371],{"type":32,"tag":189,"props":372,"children":373},{"style":213},[374],{"type":37,"value":375},"    prerender: {\n",{"type":32,"tag":189,"props":377,"children":379},{"class":191,"line":378},10,[380,385,389,393],{"type":32,"tag":189,"props":381,"children":382},{"style":213},[383],{"type":37,"value":384},"      crawlLinks: ",{"type":32,"tag":189,"props":386,"children":387},{"style":243},[388],{"type":37,"value":246},{"type":32,"tag":189,"props":390,"children":391},{"style":213},[392],{"type":37,"value":47},{"type":32,"tag":189,"props":394,"children":395},{"style":254},[396],{"type":37,"value":397},"\u002F\u002F Follow sitemap links\n",{"type":32,"tag":189,"props":399,"children":401},{"class":191,"line":400},11,[402,407,412,417],{"type":32,"tag":189,"props":403,"children":404},{"style":213},[405],{"type":37,"value":406},"      routes: [",{"type":32,"tag":189,"props":408,"children":409},{"style":232},[410],{"type":37,"value":411},"'\u002Fsitemap.xml'",{"type":32,"tag":189,"props":413,"children":414},{"style":213},[415],{"type":37,"value":416},"], ",{"type":32,"tag":189,"props":418,"children":419},{"style":254},[420],{"type":37,"value":421},"\u002F\u002F Manual route definition\n",{"type":32,"tag":189,"props":423,"children":425},{"class":191,"line":424},12,[426,431,436,440,445,449],{"type":32,"tag":189,"props":427,"children":428},{"style":213},[429],{"type":37,"value":430},"      ignore: [",{"type":32,"tag":189,"props":432,"children":433},{"style":232},[434],{"type":37,"value":435},"'\u002Fadmin'",{"type":32,"tag":189,"props":437,"children":438},{"style":213},[439],{"type":37,"value":47},{"type":32,"tag":189,"props":441,"children":442},{"style":232},[443],{"type":37,"value":444},"'\u002Fcheckout\u002F**'",{"type":32,"tag":189,"props":446,"children":447},{"style":213},[448],{"type":37,"value":416},{"type":32,"tag":189,"props":450,"children":451},{"style":254},[452],{"type":37,"value":453},"\u002F\u002F Exclude from prerender\n",{"type":32,"tag":189,"props":455,"children":457},{"class":191,"line":456},13,[458],{"type":32,"tag":189,"props":459,"children":460},{"style":213},[461],{"type":37,"value":462},"    },\n",{"type":32,"tag":189,"props":464,"children":466},{"class":191,"line":465},14,[467],{"type":32,"tag":189,"props":468,"children":469},{"style":213},[470],{"type":37,"value":358},{"type":32,"tag":189,"props":472,"children":474},{"class":191,"line":473},15,[475],{"type":32,"tag":189,"props":476,"children":477},{"style":213},[478],{"type":37,"value":479},"})\n",{"type":32,"tag":33,"props":481,"children":482},{},[483,489,491,497],{"type":32,"tag":40,"props":484,"children":486},{"className":485},[],[487],{"type":37,"value":488},"crawlLinks: true",{"type":37,"value":490}," auto-discovers links in the sitemap. On a 500-page site, you don't maintain a manual route list. But on a 50,000-page site, crawling all links costs 10 minutes of build time — use manual ",{"type":32,"tag":40,"props":492,"children":494},{"className":493},[],[495],{"type":37,"value":496},"routes",{"type":37,"value":498}," array plus incremental strategy instead.",{"type":32,"tag":500,"props":501,"children":503},"h3",{"id":502},"avoid-data-duplication-with-payload-extraction",[504],{"type":37,"value":505},"Avoid Data Duplication with Payload Extraction",{"type":32,"tag":33,"props":507,"children":508},{},[509,511,517],{"type":37,"value":510},"Nuxt 3 generates ",{"type":32,"tag":40,"props":512,"children":514},{"className":513},[],[515],{"type":37,"value":516},"_payload.json",{"type":37,"value":518}," for each prerendered route. This file serializes server-side fetched data. On SPA navigation, it reuses this JSON without re-hitting the API.",{"type":32,"tag":179,"props":520,"children":522},{"className":181,"code":521,"language":183,"meta":16,"style":16},"\u002F\u002F pages\u002Fproduct\u002F[id].vue\n\u003Cscript setup>\nconst route = useRoute()\nconst { data: product } = await useFetch(`\u002Fapi\u002Fproducts\u002F${route.params.id}`)\n\u003C\u002Fscript>\n",[523],{"type":32,"tag":40,"props":524,"children":525},{"__ignoreMap":16},[526,534,552,580,672],{"type":32,"tag":189,"props":527,"children":528},{"class":191,"line":192},[529],{"type":32,"tag":189,"props":530,"children":531},{"style":254},[532],{"type":37,"value":533},"\u002F\u002F pages\u002Fproduct\u002F[id].vue\n",{"type":32,"tag":189,"props":535,"children":536},{"class":191,"line":219},[537,542,547],{"type":32,"tag":189,"props":538,"children":539},{"style":196},[540],{"type":37,"value":541},"\u003C",{"type":32,"tag":189,"props":543,"children":544},{"style":213},[545],{"type":37,"value":546},"script setup",{"type":32,"tag":189,"props":548,"children":549},{"style":196},[550],{"type":37,"value":551},">\n",{"type":32,"tag":189,"props":553,"children":554},{"class":191,"line":228},[555,560,565,570,575],{"type":32,"tag":189,"props":556,"children":557},{"style":196},[558],{"type":37,"value":559},"const",{"type":32,"tag":189,"props":561,"children":562},{"style":243},[563],{"type":37,"value":564}," route",{"type":32,"tag":189,"props":566,"children":567},{"style":196},[568],{"type":37,"value":569}," =",{"type":32,"tag":189,"props":571,"children":572},{"style":207},[573],{"type":37,"value":574}," useRoute",{"type":32,"tag":189,"props":576,"children":577},{"style":213},[578],{"type":37,"value":579},"()\n",{"type":32,"tag":189,"props":581,"children":582},{"class":191,"line":260},[583,587,592,598,603,608,613,618,623,628,633,638,643,648,653,657,662,667],{"type":32,"tag":189,"props":584,"children":585},{"style":196},[586],{"type":37,"value":559},{"type":32,"tag":189,"props":588,"children":589},{"style":213},[590],{"type":37,"value":591}," { ",{"type":32,"tag":189,"props":593,"children":595},{"style":594},"--shiki-default:#FFAB70",[596],{"type":37,"value":597},"data",{"type":32,"tag":189,"props":599,"children":600},{"style":213},[601],{"type":37,"value":602},": ",{"type":32,"tag":189,"props":604,"children":605},{"style":243},[606],{"type":37,"value":607},"product",{"type":32,"tag":189,"props":609,"children":610},{"style":213},[611],{"type":37,"value":612}," } ",{"type":32,"tag":189,"props":614,"children":615},{"style":196},[616],{"type":37,"value":617},"=",{"type":32,"tag":189,"props":619,"children":620},{"style":196},[621],{"type":37,"value":622}," await",{"type":32,"tag":189,"props":624,"children":625},{"style":207},[626],{"type":37,"value":627}," useFetch",{"type":32,"tag":189,"props":629,"children":630},{"style":213},[631],{"type":37,"value":632},"(",{"type":32,"tag":189,"props":634,"children":635},{"style":232},[636],{"type":37,"value":637},"`\u002Fapi\u002Fproducts\u002F${",{"type":32,"tag":189,"props":639,"children":640},{"style":213},[641],{"type":37,"value":642},"route",{"type":32,"tag":189,"props":644,"children":645},{"style":232},[646],{"type":37,"value":647},".",{"type":32,"tag":189,"props":649,"children":650},{"style":213},[651],{"type":37,"value":652},"params",{"type":32,"tag":189,"props":654,"children":655},{"style":232},[656],{"type":37,"value":647},{"type":32,"tag":189,"props":658,"children":659},{"style":213},[660],{"type":37,"value":661},"id",{"type":32,"tag":189,"props":663,"children":664},{"style":232},[665],{"type":37,"value":666},"}`",{"type":32,"tag":189,"props":668,"children":669},{"style":213},[670],{"type":37,"value":671},")\n",{"type":32,"tag":189,"props":673,"children":674},{"class":191,"line":288},[675,680,685],{"type":32,"tag":189,"props":676,"children":677},{"style":196},[678],{"type":37,"value":679},"\u003C\u002F",{"type":32,"tag":189,"props":681,"children":682},{"style":213},[683],{"type":37,"value":684},"script",{"type":32,"tag":189,"props":686,"children":687},{"style":196},[688],{"type":37,"value":551},{"type":32,"tag":33,"props":690,"children":691},{},[692,694,700,702,707,709,714],{"type":37,"value":693},"During prerender, ",{"type":32,"tag":40,"props":695,"children":697},{"className":696},[],[698],{"type":37,"value":699},"\u002Fapi\u002Fproducts\u002F123",{"type":37,"value":701}," is called; the response gets embedded in ",{"type":32,"tag":40,"props":703,"children":705},{"className":704},[],[706],{"type":37,"value":516},{"type":37,"value":708},". On client-side navigation, the same data is reused. Tradeoff: payload size. On a 10,000-product site where each ",{"type":32,"tag":40,"props":710,"children":712},{"className":711},[],[713],{"type":37,"value":516},{"type":37,"value":715}," is 5KB, you generate 50MB of static assets. Factor CDN bandwidth cost into the equation.",{"type":32,"tag":33,"props":717,"children":718},{},[719,721,727],{"type":37,"value":720},"Optimize this by gzipping\u002Fbrotli-compressing payloads under ",{"type":32,"tag":40,"props":722,"children":724},{"className":723},[],[725],{"type":37,"value":726},"nitro.output.publicDir",{"type":37,"value":728}," at build time. Nginx\u002FCloudflare do this automatically, but build-time compression cuts 5KB → 1.2KB.",{"type":32,"tag":56,"props":730,"children":732},{"id":731},"build-performance-parallelization-and-cache-strategies",[733],{"type":37,"value":734},"Build Performance: Parallelization and Cache Strategies",{"type":32,"tag":33,"props":736,"children":737},{},[738],{"type":37,"value":739},"Nuxt 3's build pipeline has three phases: webpack\u002Fvite compile → nitro prerender → asset optimization. Prerender becomes the bottleneck at 10,000 routes.",{"type":32,"tag":33,"props":741,"children":742},{},[743,749,751,757],{"type":32,"tag":744,"props":745,"children":746},"strong",{},[747],{"type":37,"value":748},"Parallelization:",{"type":37,"value":750}," The Nitro ",{"type":32,"tag":40,"props":752,"children":754},{"className":753},[],[755],{"type":37,"value":756},"prerender.concurrency",{"type":37,"value":758}," parameter controls how many routes render simultaneously. Default is 10. Increase to 50 if RAM permits:",{"type":32,"tag":179,"props":760,"children":762},{"className":181,"code":761,"language":183,"meta":16,"style":16},"nitro: {\n  prerender: {\n    concurrency: 50,\n  },\n}\n",[763],{"type":32,"tag":40,"props":764,"children":765},{"__ignoreMap":16},[766,779,791,813,820],{"type":32,"tag":189,"props":767,"children":768},{"class":191,"line":192},[769,774],{"type":32,"tag":189,"props":770,"children":771},{"style":207},[772],{"type":37,"value":773},"nitro",{"type":32,"tag":189,"props":775,"children":776},{"style":213},[777],{"type":37,"value":778},": {\n",{"type":32,"tag":189,"props":780,"children":781},{"class":191,"line":219},[782,787],{"type":32,"tag":189,"props":783,"children":784},{"style":207},[785],{"type":37,"value":786},"  prerender",{"type":32,"tag":189,"props":788,"children":789},{"style":213},[790],{"type":37,"value":778},{"type":32,"tag":189,"props":792,"children":793},{"class":191,"line":228},[794,799,803,808],{"type":32,"tag":189,"props":795,"children":796},{"style":207},[797],{"type":37,"value":798},"    concurrency",{"type":32,"tag":189,"props":800,"children":801},{"style":213},[802],{"type":37,"value":602},{"type":32,"tag":189,"props":804,"children":805},{"style":243},[806],{"type":37,"value":807},"50",{"type":32,"tag":189,"props":809,"children":810},{"style":213},[811],{"type":37,"value":812},",\n",{"type":32,"tag":189,"props":814,"children":815},{"class":191,"line":260},[816],{"type":32,"tag":189,"props":817,"children":818},{"style":213},[819],{"type":37,"value":358},{"type":32,"tag":189,"props":821,"children":822},{"class":191,"line":288},[823],{"type":32,"tag":189,"props":824,"children":825},{"style":213},[826],{"type":37,"value":827},"}\n",{"type":32,"tag":33,"props":829,"children":830},{},[831],{"type":37,"value":832},"On a 4-core CPU + 16GB RAM machine, bumping 10 → 50 reduced build time from 40s to 12s. Beyond 50, diminishing returns appear as CPU context-switch overhead increases.",{"type":32,"tag":33,"props":834,"children":835},{},[836,841,843,849],{"type":32,"tag":744,"props":837,"children":838},{},[839],{"type":37,"value":840},"Incremental build cache:",{"type":37,"value":842}," Netlify\u002FVercel persists ",{"type":32,"tag":40,"props":844,"children":846},{"className":845},[],[847],{"type":37,"value":848},".nuxt\u002Fprerender",{"type":37,"value":850}," cache. Unchanged routes skip rebuild. With git hash-based cache invalidation, only changed routes re-render per deploy.",{"type":32,"tag":179,"props":852,"children":854},{"className":181,"code":853,"language":183,"meta":16,"style":16},"\u002F\u002F netlify.toml\n[build]\n  command = \"nuxt build\"\n  publish = \".output\u002Fpublic\"\n\n[[plugins]]\n  package = \"@netlify\u002Fplugin-nextjs\"\n  \n[build.environment]\n  NUXT_TELEMETRY_DISABLED = \"1\"\n",[855],{"type":32,"tag":40,"props":856,"children":857},{"__ignoreMap":16},[858,866,874,891,908,917,925,942,950,958],{"type":32,"tag":189,"props":859,"children":860},{"class":191,"line":192},[861],{"type":32,"tag":189,"props":862,"children":863},{"style":254},[864],{"type":37,"value":865},"\u002F\u002F netlify.toml\n",{"type":32,"tag":189,"props":867,"children":868},{"class":191,"line":219},[869],{"type":32,"tag":189,"props":870,"children":871},{"style":213},[872],{"type":37,"value":873},"[build]\n",{"type":32,"tag":189,"props":875,"children":876},{"class":191,"line":228},[877,882,886],{"type":32,"tag":189,"props":878,"children":879},{"style":213},[880],{"type":37,"value":881},"  command ",{"type":32,"tag":189,"props":883,"children":884},{"style":196},[885],{"type":37,"value":617},{"type":32,"tag":189,"props":887,"children":888},{"style":232},[889],{"type":37,"value":890}," \"nuxt build\"\n",{"type":32,"tag":189,"props":892,"children":893},{"class":191,"line":260},[894,899,903],{"type":32,"tag":189,"props":895,"children":896},{"style":213},[897],{"type":37,"value":898},"  publish ",{"type":32,"tag":189,"props":900,"children":901},{"style":196},[902],{"type":37,"value":617},{"type":32,"tag":189,"props":904,"children":905},{"style":232},[906],{"type":37,"value":907}," \".output\u002Fpublic\"\n",{"type":32,"tag":189,"props":909,"children":910},{"class":191,"line":288},[911],{"type":32,"tag":189,"props":912,"children":914},{"emptyLinePlaceholder":913},true,[915],{"type":37,"value":916},"\n",{"type":32,"tag":189,"props":918,"children":919},{"class":191,"line":325},[920],{"type":32,"tag":189,"props":921,"children":922},{"style":213},[923],{"type":37,"value":924},"[[plugins]]\n",{"type":32,"tag":189,"props":926,"children":927},{"class":191,"line":352},[928,933,937],{"type":32,"tag":189,"props":929,"children":930},{"style":196},[931],{"type":37,"value":932},"  package",{"type":32,"tag":189,"props":934,"children":935},{"style":196},[936],{"type":37,"value":569},{"type":32,"tag":189,"props":938,"children":939},{"style":232},[940],{"type":37,"value":941}," \"@netlify\u002Fplugin-nextjs\"\n",{"type":32,"tag":189,"props":943,"children":944},{"class":191,"line":26},[945],{"type":32,"tag":189,"props":946,"children":947},{"style":213},[948],{"type":37,"value":949},"  \n",{"type":32,"tag":189,"props":951,"children":952},{"class":191,"line":369},[953],{"type":32,"tag":189,"props":954,"children":955},{"style":213},[956],{"type":37,"value":957},"[build.environment]\n",{"type":32,"tag":189,"props":959,"children":960},{"class":191,"line":378},[961,966,970],{"type":32,"tag":189,"props":962,"children":963},{"style":243},[964],{"type":37,"value":965},"  NUXT_TELEMETRY_DISABLED",{"type":32,"tag":189,"props":967,"children":968},{"style":196},[969],{"type":37,"value":569},{"type":32,"tag":189,"props":971,"children":972},{"style":232},[973],{"type":37,"value":974}," \"1\"\n",{"type":32,"tag":33,"props":976,"children":977},{},[978],{"type":37,"value":979},"At 70% cache hit rate, a 5,000-route site builds in 5s instead of 15s.",{"type":32,"tag":500,"props":981,"children":983},{"id":982},"bundle-size-versus-prerender-tradeoff",[984],{"type":37,"value":985},"Bundle Size versus Prerender Tradeoff",{"type":32,"tag":33,"props":987,"children":988},{},[989,991,997],{"type":37,"value":990},"Full prerender generates HTML files containing the JS bundle for hydration. In Nuxt 3, ",{"type":32,"tag":40,"props":992,"children":994},{"className":993},[],[995],{"type":37,"value":996},"experimental.payloadExtraction",{"type":37,"value":998}," decouples payload from HTML, optimizing chunk splitting.",{"type":32,"tag":179,"props":1000,"children":1002},{"className":181,"code":1001,"language":183,"meta":16,"style":16},"experimental: {\n  payloadExtraction: true,\n  inlineSSRStyles: false, \u002F\u002F Critical CSS not inlined\n}\n",[1003],{"type":32,"tag":40,"props":1004,"children":1005},{"__ignoreMap":16},[1006,1018,1038,1063],{"type":32,"tag":189,"props":1007,"children":1008},{"class":191,"line":192},[1009,1014],{"type":32,"tag":189,"props":1010,"children":1011},{"style":207},[1012],{"type":37,"value":1013},"experimental",{"type":32,"tag":189,"props":1015,"children":1016},{"style":213},[1017],{"type":37,"value":778},{"type":32,"tag":189,"props":1019,"children":1020},{"class":191,"line":219},[1021,1026,1030,1034],{"type":32,"tag":189,"props":1022,"children":1023},{"style":207},[1024],{"type":37,"value":1025},"  payloadExtraction",{"type":32,"tag":189,"props":1027,"children":1028},{"style":213},[1029],{"type":37,"value":602},{"type":32,"tag":189,"props":1031,"children":1032},{"style":243},[1033],{"type":37,"value":246},{"type":32,"tag":189,"props":1035,"children":1036},{"style":213},[1037],{"type":37,"value":812},{"type":32,"tag":189,"props":1039,"children":1040},{"class":191,"line":228},[1041,1046,1050,1054,1058],{"type":32,"tag":189,"props":1042,"children":1043},{"style":207},[1044],{"type":37,"value":1045},"  inlineSSRStyles",{"type":32,"tag":189,"props":1047,"children":1048},{"style":213},[1049],{"type":37,"value":602},{"type":32,"tag":189,"props":1051,"children":1052},{"style":243},[1053],{"type":37,"value":313},{"type":32,"tag":189,"props":1055,"children":1056},{"style":213},[1057],{"type":37,"value":47},{"type":32,"tag":189,"props":1059,"children":1060},{"style":254},[1061],{"type":37,"value":1062},"\u002F\u002F Critical CSS not inlined\n",{"type":32,"tag":189,"props":1064,"children":1065},{"class":191,"line":260},[1066],{"type":32,"tag":189,"props":1067,"children":1068},{"style":213},[1069],{"type":37,"value":827},{"type":32,"tag":33,"props":1071,"children":1072},{},[1073,1075,1081],{"type":37,"value":1074},"With ",{"type":32,"tag":40,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":37,"value":1080},"payloadExtraction: true",{"type":37,"value":1082},", 250KB HTML becomes 180KB HTML + 70KB JSON. Client-side navigation fetches JSON; HTML isn't reparsed. LCP drops from 2.1s to 1.8s (90th percentile, mobile 3G).",{"type":32,"tag":33,"props":1084,"children":1085},{},[1086],{"type":37,"value":1087},"But tradeoff: one extra HTTP request. With HTTP\u002F2 multiplexing, no problem. On HTTP\u002F1.1, latency increases. On modern CDNs like Cloudflare\u002FFastly where HTTP\u002F2 is default, this strategy wins.",{"type":32,"tag":56,"props":1089,"children":1091},{"id":1090},"headless-commerce-integration-shopify-nuxt-ssg",[1092],{"type":37,"value":1093},"Headless Commerce Integration: Shopify + Nuxt SSG",{"type":32,"tag":33,"props":1095,"children":1096},{},[1097],{"type":37,"value":1098},"Prerendering product pages in e-commerce creates inventory-sync complexity. Use Shopify GraphQL Storefront API with webhook-driven revalidation.",{"type":32,"tag":179,"props":1100,"children":1102},{"className":181,"code":1101,"language":183,"meta":16,"style":16},"\u002F\u002F server\u002Fapi\u002Frevalidate.post.ts\nexport default defineEventHandler(async (event) => {\n  const body = await readBody(event)\n  \n  if (body.topic === 'products\u002Fupdate') {\n    const productId = body.id\n    await nitroApp.hooks.callHook('prerender:routes', [\n      `\u002Fproducts\u002F${productId}`\n    ])\n  }\n  \n  return { status: 'revalidated' }\n})\n",[1103],{"type":32,"tag":40,"props":1104,"children":1105},{"__ignoreMap":16},[1106,1114,1164,1195,1202,1230,1252,1284,1302,1310,1318,1325,1348],{"type":32,"tag":189,"props":1107,"children":1108},{"class":191,"line":192},[1109],{"type":32,"tag":189,"props":1110,"children":1111},{"style":254},[1112],{"type":37,"value":1113},"\u002F\u002F server\u002Fapi\u002Frevalidate.post.ts\n",{"type":32,"tag":189,"props":1115,"children":1116},{"class":191,"line":219},[1117,1121,1125,1130,1134,1139,1144,1149,1154,1159],{"type":32,"tag":189,"props":1118,"children":1119},{"style":196},[1120],{"type":37,"value":199},{"type":32,"tag":189,"props":1122,"children":1123},{"style":196},[1124],{"type":37,"value":204},{"type":32,"tag":189,"props":1126,"children":1127},{"style":207},[1128],{"type":37,"value":1129}," defineEventHandler",{"type":32,"tag":189,"props":1131,"children":1132},{"style":213},[1133],{"type":37,"value":632},{"type":32,"tag":189,"props":1135,"children":1136},{"style":196},[1137],{"type":37,"value":1138},"async",{"type":32,"tag":189,"props":1140,"children":1141},{"style":213},[1142],{"type":37,"value":1143}," (",{"type":32,"tag":189,"props":1145,"children":1146},{"style":594},[1147],{"type":37,"value":1148},"event",{"type":32,"tag":189,"props":1150,"children":1151},{"style":213},[1152],{"type":37,"value":1153},") ",{"type":32,"tag":189,"props":1155,"children":1156},{"style":196},[1157],{"type":37,"value":1158},"=>",{"type":32,"tag":189,"props":1160,"children":1161},{"style":213},[1162],{"type":37,"value":1163}," {\n",{"type":32,"tag":189,"props":1165,"children":1166},{"class":191,"line":228},[1167,1172,1177,1181,1185,1190],{"type":32,"tag":189,"props":1168,"children":1169},{"style":196},[1170],{"type":37,"value":1171},"  const",{"type":32,"tag":189,"props":1173,"children":1174},{"style":243},[1175],{"type":37,"value":1176}," body",{"type":32,"tag":189,"props":1178,"children":1179},{"style":196},[1180],{"type":37,"value":569},{"type":32,"tag":189,"props":1182,"children":1183},{"style":196},[1184],{"type":37,"value":622},{"type":32,"tag":189,"props":1186,"children":1187},{"style":207},[1188],{"type":37,"value":1189}," readBody",{"type":32,"tag":189,"props":1191,"children":1192},{"style":213},[1193],{"type":37,"value":1194},"(event)\n",{"type":32,"tag":189,"props":1196,"children":1197},{"class":191,"line":260},[1198],{"type":32,"tag":189,"props":1199,"children":1200},{"style":213},[1201],{"type":37,"value":949},{"type":32,"tag":189,"props":1203,"children":1204},{"class":191,"line":288},[1205,1210,1215,1220,1225],{"type":32,"tag":189,"props":1206,"children":1207},{"style":196},[1208],{"type":37,"value":1209},"  if",{"type":32,"tag":189,"props":1211,"children":1212},{"style":213},[1213],{"type":37,"value":1214}," (body.topic ",{"type":32,"tag":189,"props":1216,"children":1217},{"style":196},[1218],{"type":37,"value":1219},"===",{"type":32,"tag":189,"props":1221,"children":1222},{"style":232},[1223],{"type":37,"value":1224}," 'products\u002Fupdate'",{"type":32,"tag":189,"props":1226,"children":1227},{"style":213},[1228],{"type":37,"value":1229},") {\n",{"type":32,"tag":189,"props":1231,"children":1232},{"class":191,"line":325},[1233,1238,1243,1247],{"type":32,"tag":189,"props":1234,"children":1235},{"style":196},[1236],{"type":37,"value":1237},"    const",{"type":32,"tag":189,"props":1239,"children":1240},{"style":243},[1241],{"type":37,"value":1242}," productId",{"type":32,"tag":189,"props":1244,"children":1245},{"style":196},[1246],{"type":37,"value":569},{"type":32,"tag":189,"props":1248,"children":1249},{"style":213},[1250],{"type":37,"value":1251}," body.id\n",{"type":32,"tag":189,"props":1253,"children":1254},{"class":191,"line":352},[1255,1260,1265,1270,1274,1279],{"type":32,"tag":189,"props":1256,"children":1257},{"style":196},[1258],{"type":37,"value":1259},"    await",{"type":32,"tag":189,"props":1261,"children":1262},{"style":213},[1263],{"type":37,"value":1264}," nitroApp.hooks.",{"type":32,"tag":189,"props":1266,"children":1267},{"style":207},[1268],{"type":37,"value":1269},"callHook",{"type":32,"tag":189,"props":1271,"children":1272},{"style":213},[1273],{"type":37,"value":632},{"type":32,"tag":189,"props":1275,"children":1276},{"style":232},[1277],{"type":37,"value":1278},"'prerender:routes'",{"type":32,"tag":189,"props":1280,"children":1281},{"style":213},[1282],{"type":37,"value":1283},", [\n",{"type":32,"tag":189,"props":1285,"children":1286},{"class":191,"line":26},[1287,1292,1297],{"type":32,"tag":189,"props":1288,"children":1289},{"style":232},[1290],{"type":37,"value":1291},"      `\u002Fproducts\u002F${",{"type":32,"tag":189,"props":1293,"children":1294},{"style":213},[1295],{"type":37,"value":1296},"productId",{"type":32,"tag":189,"props":1298,"children":1299},{"style":232},[1300],{"type":37,"value":1301},"}`\n",{"type":32,"tag":189,"props":1303,"children":1304},{"class":191,"line":369},[1305],{"type":32,"tag":189,"props":1306,"children":1307},{"style":213},[1308],{"type":37,"value":1309},"    ])\n",{"type":32,"tag":189,"props":1311,"children":1312},{"class":191,"line":378},[1313],{"type":32,"tag":189,"props":1314,"children":1315},{"style":213},[1316],{"type":37,"value":1317},"  }\n",{"type":32,"tag":189,"props":1319,"children":1320},{"class":191,"line":400},[1321],{"type":32,"tag":189,"props":1322,"children":1323},{"style":213},[1324],{"type":37,"value":949},{"type":32,"tag":189,"props":1326,"children":1327},{"class":191,"line":424},[1328,1333,1338,1343],{"type":32,"tag":189,"props":1329,"children":1330},{"style":196},[1331],{"type":37,"value":1332},"  return",{"type":32,"tag":189,"props":1334,"children":1335},{"style":213},[1336],{"type":37,"value":1337}," { status: ",{"type":32,"tag":189,"props":1339,"children":1340},{"style":232},[1341],{"type":37,"value":1342},"'revalidated'",{"type":32,"tag":189,"props":1344,"children":1345},{"style":213},[1346],{"type":37,"value":1347}," }\n",{"type":32,"tag":189,"props":1349,"children":1350},{"class":191,"line":456},[1351],{"type":32,"tag":189,"props":1352,"children":1353},{"style":213},[1354],{"type":37,"value":479},{"type":32,"tag":33,"props":1356,"children":1357},{},[1358,1360,1366],{"type":37,"value":1359},"Subscribe to webhooks from Shopify Admin API → when a product updates, ",{"type":32,"tag":40,"props":1361,"children":1363},{"className":1362},[],[1364],{"type":37,"value":1365},"\u002Fapi\u002Frevalidate",{"type":37,"value":1367}," fires → only that route re-renders. Instead of a full catalog rebuild, one route regenerates in 200ms.",{"type":32,"tag":33,"props":1369,"children":1370},{},[1371,1373,1382],{"type":37,"value":1372},"In ",{"type":32,"tag":1374,"props":1375,"children":1379},"a",{"href":1376,"rel":1377},"https:\u002F\u002Fwww.roibase.com.tr\u002Fen\u002Fheadless",[1378],"nofollow",[1380],{"type":37,"value":1381},"headless commerce",{"type":37,"value":1383}," architectures, this pattern is critical. Monolithic platforms force full rebuilds; headless lets you do granular invalidation. On a 50,000-SKU store with 500 daily product updates, full rebuild takes 6 hours; incremental revalidation takes 2 minutes.",{"type":32,"tag":56,"props":1385,"children":1387},{"id":1386},"isr-edge-caching-hybrid-strategy-with-cloudflare-workers",[1388],{"type":37,"value":1389},"ISR + Edge Caching: Hybrid Strategy with Cloudflare Workers",{"type":32,"tag":33,"props":1391,"children":1392},{},[1393],{"type":37,"value":1394},"On Nuxt 3 + Cloudflare Pages, implement ISR using Workers KV. Routes render on first request, write to KV, subsequent requests serve from KV.",{"type":32,"tag":179,"props":1396,"children":1398},{"className":181,"code":1397,"language":183,"meta":16,"style":16},"\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  nitro: {\n    preset: 'cloudflare-pages',\n  },\n  routeRules: {\n    '\u002Fblog\u002F**': { isr: 3600 }, \u002F\u002F 1-hour TTL\n  },\n})\n",[1399],{"type":32,"tag":40,"props":1400,"children":1401},{"__ignoreMap":16},[1402,1410,1429,1436,1453,1460,1467,1492,1499],{"type":32,"tag":189,"props":1403,"children":1404},{"class":191,"line":192},[1405],{"type":32,"tag":189,"props":1406,"children":1407},{"style":254},[1408],{"type":37,"value":1409},"\u002F\u002F nuxt.config.ts\n",{"type":32,"tag":189,"props":1411,"children":1412},{"class":191,"line":219},[1413,1417,1421,1425],{"type":32,"tag":189,"props":1414,"children":1415},{"style":196},[1416],{"type":37,"value":199},{"type":32,"tag":189,"props":1418,"children":1419},{"style":196},[1420],{"type":37,"value":204},{"type":32,"tag":189,"props":1422,"children":1423},{"style":207},[1424],{"type":37,"value":210},{"type":32,"tag":189,"props":1426,"children":1427},{"style":213},[1428],{"type":37,"value":216},{"type":32,"tag":189,"props":1430,"children":1431},{"class":191,"line":228},[1432],{"type":32,"tag":189,"props":1433,"children":1434},{"style":213},[1435],{"type":37,"value":366},{"type":32,"tag":189,"props":1437,"children":1438},{"class":191,"line":260},[1439,1444,1449],{"type":32,"tag":189,"props":1440,"children":1441},{"style":213},[1442],{"type":37,"value":1443},"    preset: ",{"type":32,"tag":189,"props":1445,"children":1446},{"style":232},[1447],{"type":37,"value":1448},"'cloudflare-pages'",{"type":32,"tag":189,"props":1450,"children":1451},{"style":213},[1452],{"type":37,"value":812},{"type":32,"tag":189,"props":1454,"children":1455},{"class":191,"line":288},[1456],{"type":32,"tag":189,"props":1457,"children":1458},{"style":213},[1459],{"type":37,"value":358},{"type":32,"tag":189,"props":1461,"children":1462},{"class":191,"line":325},[1463],{"type":32,"tag":189,"props":1464,"children":1465},{"style":213},[1466],{"type":37,"value":225},{"type":32,"tag":189,"props":1468,"children":1469},{"class":191,"line":352},[1470,1475,1479,1483,1487],{"type":32,"tag":189,"props":1471,"children":1472},{"style":232},[1473],{"type":37,"value":1474},"    '\u002Fblog\u002F**'",{"type":32,"tag":189,"props":1476,"children":1477},{"style":213},[1478],{"type":37,"value":336},{"type":32,"tag":189,"props":1480,"children":1481},{"style":243},[1482],{"type":37,"value":276},{"type":32,"tag":189,"props":1484,"children":1485},{"style":213},[1486],{"type":37,"value":251},{"type":32,"tag":189,"props":1488,"children":1489},{"style":254},[1490],{"type":37,"value":1491},"\u002F\u002F 1-hour TTL\n",{"type":32,"tag":189,"props":1493,"children":1494},{"class":191,"line":26},[1495],{"type":32,"tag":189,"props":1496,"children":1497},{"style":213},[1498],{"type":37,"value":358},{"type":32,"tag":189,"props":1500,"children":1501},{"class":191,"line":369},[1502],{"type":32,"tag":189,"props":1503,"children":1504},{"style":213},[1505],{"type":37,"value":479},{"type":32,"tag":33,"props":1507,"children":1508},{},[1509],{"type":37,"value":1510},"Cloudflare KV latency sits ~50ms globally at the edge. First render is 800ms + 50ms KV write; subsequent requests are 50ms. At 95% cache hit rate, average response time is 95×50ms + 5×850ms = 90ms. Full SSR would hold at 800ms steady.",{"type":32,"tag":33,"props":1512,"children":1513},{},[1514],{"type":37,"value":1515},"Tradeoff: KV write cost. At 1M requests\u002Fmonth, you pay $0.50 (Cloudflare pricing, 2026). Static hosting is free, so ISR adds cost, but UX gain justifies it.",{"type":32,"tag":1517,"props":1518,"children":1519},"hr",{},[],{"type":32,"tag":33,"props":1521,"children":1522},{},[1523],{"type":37,"value":1524},"Nuxt 3 SSG strategy requires deciding among the data freshness, build time, and runtime performance triangle. Prerender homepage, ISR long tail, server-side critical paths — recalculate this mix per project. Without measurement, saying \"full static is faster\" is wrong; at 10,000 routes, build time can ruin UX. Incremental regeneration plus edge cache wins on both build time and response time, but you accept orchestration complexity.",{"type":32,"tag":1526,"props":1527,"children":1528},"style",{},[1529],{"type":37,"value":1530},"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);}",{"title":16,"searchDepth":228,"depth":228,"links":1532},[1533,1534,1537,1540,1541],{"id":58,"depth":219,"text":61},{"id":127,"depth":219,"text":130,"children":1535},[1536],{"id":502,"depth":228,"text":505},{"id":731,"depth":219,"text":734,"children":1538},[1539],{"id":982,"depth":228,"text":985},{"id":1090,"depth":219,"text":1093},{"id":1386,"depth":219,"text":1389},"markdown","content:en:tech:nuxt-3-ssg-prerender-strategies-build-optimization.md","content","en\u002Ftech\u002Fnuxt-3-ssg-prerender-strategies-build-optimization.md","en\u002Ftech\u002Fnuxt-3-ssg-prerender-strategies-build-optimization","md",1780898611671]