[{"data":1,"prerenderedAt":1898},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fru\u002Ftech\u002Fssg-strategii-dlya-nuxt-3-i-optimizaciya-sborki":13},{"i18nKey":4,"paths":5},"tech-007-2026-08",{"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-ssg-nuxt-3","\u002Ffr\u002Ftech\u002Fstrategie-prerender-nuxt-3","\u002Fit\u002Ftech\u002Fssg-strategie-nuxt-3-prerender-e-ottimizzazione-build","\u002Fru\u002Ftech\u002Fssg-strategii-dlya-nuxt-3-i-optimizaciya-sborki","\u002Ftr\u002Ftech\u002Fnuxt-3-ssg-prerender-stratejileri-ve-build-optimizasyonu",{"_path":11,"_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":1892,"_id":1893,"_source":1894,"_file":1895,"_stem":1896,"_extension":1897},"tech",false,"","Nuxt 3 SSG: Strategii Prerenderinga i Optimizaciya Sborki","Static site generation v Nuxt 3: pravila marshrutov, Nitro prerenderirovaniye, inkrementalnye sborki i strategii deployment v production.","2026-08-06",[21,22,23,24,25],"nuxt-3","ssg","static-generation","web-performance","nitro",9,"Roibase",{"type":29,"children":30,"toc":1879},"root",[31,39,46,68,229,250,257,262,502,515,521,545,699,704,761,767,780,835,847,853,866,1141,1161,1167,1172,1393,1398,1404,1416,1658,1663,1691,1696,1702,1715,1857,1868,1873],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","Architektura SSG (Static Site Generation) v Nuxt 3 predstavlyaet fundamental'nyy sdvig ot klassicheskoy komandy \"nuxt generate\" vremeni Vue 2. Novaya sistema prerenderirovaniya na osnove engine Nitro predostavlyaet granularnost na urovne marshrutov — dlya kazhdoy stranicy mozhno opredelit' sobstvennuyu strategiyu renderirovaniya. V etoy stat'ye rassmatrivayem production-ready nastroiku SSG, konfiguraciyu gibridnogo renderirovaniya s ispol'zovaniem rule marshrutov i chastyye uzkie mesta optimizacii v pipeline sborki.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"nitro-prerenderirovaniye-novyy-fundament-ssg",[44],{"type":37,"value":45},"Nitro Prerenderirovaniye: Novyy Fundament SSG",{"type":32,"tag":33,"props":47,"children":48},{},[49,51,58,60,66],{"type":37,"value":50},"V Nuxt 3 SSG rabotaet na osnove engine'a prerenderirovaniya Nitro. Upravlyayesh' etim protsessom cherez klyuch ",{"type":32,"tag":52,"props":53,"children":55},"code",{"className":54},[],[56],{"type":37,"value":57},"nitro.prerender",{"type":37,"value":59}," v fayle ",{"type":32,"tag":52,"props":61,"children":63},{"className":62},[],[64],{"type":37,"value":65},"nuxt.config.ts",{"type":37,"value":67},". Klassicheskiy podkhod sostoyat v renderirovaniii vsekh marshrutov v vremya sborki — teper' vozmozhno selektivnoe prerenderirovaniye.",{"type":32,"tag":69,"props":70,"children":74},"pre",{"className":71,"code":72,"language":73,"meta":16,"style":16},"language-typescript shiki shiki-themes github-dark","export default defineNuxtConfig({\n  nitro: {\n    prerender: {\n      crawlLinks: true,\n      routes: ['\u002Fsitemap.xml', '\u002Frss.xml'],\n      ignore: ['\u002Fapi', '\u002Fadmin']\n    }\n  }\n})\n","typescript",[75],{"type":32,"tag":52,"props":76,"children":77},{"__ignoreMap":16},[78,107,116,125,145,175,203,212,221],{"type":32,"tag":79,"props":80,"children":83},"span",{"class":81,"line":82},"line",1,[84,90,95,101],{"type":32,"tag":79,"props":85,"children":87},{"style":86},"--shiki-default:#F97583",[88],{"type":37,"value":89},"export",{"type":32,"tag":79,"props":91,"children":92},{"style":86},[93],{"type":37,"value":94}," default",{"type":32,"tag":79,"props":96,"children":98},{"style":97},"--shiki-default:#B392F0",[99],{"type":37,"value":100}," defineNuxtConfig",{"type":32,"tag":79,"props":102,"children":104},{"style":103},"--shiki-default:#E1E4E8",[105],{"type":37,"value":106},"({\n",{"type":32,"tag":79,"props":108,"children":110},{"class":81,"line":109},2,[111],{"type":32,"tag":79,"props":112,"children":113},{"style":103},[114],{"type":37,"value":115},"  nitro: {\n",{"type":32,"tag":79,"props":117,"children":119},{"class":81,"line":118},3,[120],{"type":32,"tag":79,"props":121,"children":122},{"style":103},[123],{"type":37,"value":124},"    prerender: {\n",{"type":32,"tag":79,"props":126,"children":128},{"class":81,"line":127},4,[129,134,140],{"type":32,"tag":79,"props":130,"children":131},{"style":103},[132],{"type":37,"value":133},"      crawlLinks: ",{"type":32,"tag":79,"props":135,"children":137},{"style":136},"--shiki-default:#79B8FF",[138],{"type":37,"value":139},"true",{"type":32,"tag":79,"props":141,"children":142},{"style":103},[143],{"type":37,"value":144},",\n",{"type":32,"tag":79,"props":146,"children":148},{"class":81,"line":147},5,[149,154,160,165,170],{"type":32,"tag":79,"props":150,"children":151},{"style":103},[152],{"type":37,"value":153},"      routes: [",{"type":32,"tag":79,"props":155,"children":157},{"style":156},"--shiki-default:#9ECBFF",[158],{"type":37,"value":159},"'\u002Fsitemap.xml'",{"type":32,"tag":79,"props":161,"children":162},{"style":103},[163],{"type":37,"value":164},", ",{"type":32,"tag":79,"props":166,"children":167},{"style":156},[168],{"type":37,"value":169},"'\u002Frss.xml'",{"type":32,"tag":79,"props":171,"children":172},{"style":103},[173],{"type":37,"value":174},"],\n",{"type":32,"tag":79,"props":176,"children":178},{"class":81,"line":177},6,[179,184,189,193,198],{"type":32,"tag":79,"props":180,"children":181},{"style":103},[182],{"type":37,"value":183},"      ignore: [",{"type":32,"tag":79,"props":185,"children":186},{"style":156},[187],{"type":37,"value":188},"'\u002Fapi'",{"type":32,"tag":79,"props":190,"children":191},{"style":103},[192],{"type":37,"value":164},{"type":32,"tag":79,"props":194,"children":195},{"style":156},[196],{"type":37,"value":197},"'\u002Fadmin'",{"type":32,"tag":79,"props":199,"children":200},{"style":103},[201],{"type":37,"value":202},"]\n",{"type":32,"tag":79,"props":204,"children":206},{"class":81,"line":205},7,[207],{"type":32,"tag":79,"props":208,"children":209},{"style":103},[210],{"type":37,"value":211},"    }\n",{"type":32,"tag":79,"props":213,"children":215},{"class":81,"line":214},8,[216],{"type":32,"tag":79,"props":217,"children":218},{"style":103},[219],{"type":37,"value":220},"  }\n",{"type":32,"tag":79,"props":222,"children":223},{"class":81,"line":26},[224],{"type":32,"tag":79,"props":225,"children":226},{"style":103},[227],{"type":37,"value":228},"})\n",{"type":32,"tag":33,"props":230,"children":231},{},[232,234,240,242,248],{"type":37,"value":233},"Parametr ",{"type":32,"tag":52,"props":235,"children":237},{"className":236},[],[238],{"type":37,"value":239},"crawlLinks: true",{"type":37,"value":241}," govorit Nuxt'u: avtomaticheski obnaruzhit' i prerenderit' vse stranicy, na kotoryye ukazyvayut ssylki ",{"type":32,"tag":52,"props":243,"children":245},{"className":244},[],[246],{"type":37,"value":247},"\u003CNuxtLink>",{"type":37,"value":249},". Eto khorosho rabotaet dlya blogov — no na e-commerce saytakh s 10 tysyachami tovarov vremya sborki rastet eksponentsialno. Tam nuzhen dinamicheskiy inject marshrutov.",{"type":32,"tag":251,"props":252,"children":254},"h3",{"id":253},"dinamicheskiy-inject-marshrutov",[255],{"type":37,"value":256},"Dinamicheskiy Inject Marshrutov",{"type":32,"tag":33,"props":258,"children":259},{},[260],{"type":37,"value":261},"Vmesto ruchnoго vpisa vsekh marshrutov dlya dinamicheskikh stranic (tovarnyye listingi, proizvodstvennye stranicy), ispol'zuesh' Nitro hooks dlya vnedreneniya marshrutov v runtime:",{"type":32,"tag":69,"props":263,"children":265},{"className":71,"code":264,"language":73,"meta":16,"style":16},"\u002F\u002F server\u002Fplugins\u002Fprerender.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('prerender:routes', async (ctx) => {\n    const products = await fetchProductSlugs() \u002F\u002F Vozmi slugs iz API\n    products.forEach(slug => {\n      ctx.routes.add(`\u002Fproducts\u002F${slug}`)\n    })\n  })\n})\n",[266],{"type":32,"tag":52,"props":267,"children":268},{"__ignoreMap":16},[269,278,320,374,412,443,479,487,495],{"type":32,"tag":79,"props":270,"children":271},{"class":81,"line":82},[272],{"type":32,"tag":79,"props":273,"children":275},{"style":274},"--shiki-default:#6A737D",[276],{"type":37,"value":277},"\u002F\u002F server\u002Fplugins\u002Fprerender.ts\n",{"type":32,"tag":79,"props":279,"children":280},{"class":81,"line":109},[281,285,289,294,299,305,310,315],{"type":32,"tag":79,"props":282,"children":283},{"style":86},[284],{"type":37,"value":89},{"type":32,"tag":79,"props":286,"children":287},{"style":86},[288],{"type":37,"value":94},{"type":32,"tag":79,"props":290,"children":291},{"style":97},[292],{"type":37,"value":293}," defineNitroPlugin",{"type":32,"tag":79,"props":295,"children":296},{"style":103},[297],{"type":37,"value":298},"((",{"type":32,"tag":79,"props":300,"children":302},{"style":301},"--shiki-default:#FFAB70",[303],{"type":37,"value":304},"nitroApp",{"type":32,"tag":79,"props":306,"children":307},{"style":103},[308],{"type":37,"value":309},") ",{"type":32,"tag":79,"props":311,"children":312},{"style":86},[313],{"type":37,"value":314},"=>",{"type":32,"tag":79,"props":316,"children":317},{"style":103},[318],{"type":37,"value":319}," {\n",{"type":32,"tag":79,"props":321,"children":322},{"class":81,"line":118},[323,328,333,338,343,347,352,357,362,366,370],{"type":32,"tag":79,"props":324,"children":325},{"style":103},[326],{"type":37,"value":327},"  nitroApp.hooks.",{"type":32,"tag":79,"props":329,"children":330},{"style":97},[331],{"type":37,"value":332},"hook",{"type":32,"tag":79,"props":334,"children":335},{"style":103},[336],{"type":37,"value":337},"(",{"type":32,"tag":79,"props":339,"children":340},{"style":156},[341],{"type":37,"value":342},"'prerender:routes'",{"type":32,"tag":79,"props":344,"children":345},{"style":103},[346],{"type":37,"value":164},{"type":32,"tag":79,"props":348,"children":349},{"style":86},[350],{"type":37,"value":351},"async",{"type":32,"tag":79,"props":353,"children":354},{"style":103},[355],{"type":37,"value":356}," (",{"type":32,"tag":79,"props":358,"children":359},{"style":301},[360],{"type":37,"value":361},"ctx",{"type":32,"tag":79,"props":363,"children":364},{"style":103},[365],{"type":37,"value":309},{"type":32,"tag":79,"props":367,"children":368},{"style":86},[369],{"type":37,"value":314},{"type":32,"tag":79,"props":371,"children":372},{"style":103},[373],{"type":37,"value":319},{"type":32,"tag":79,"props":375,"children":376},{"class":81,"line":127},[377,382,387,392,397,402,407],{"type":32,"tag":79,"props":378,"children":379},{"style":86},[380],{"type":37,"value":381},"    const",{"type":32,"tag":79,"props":383,"children":384},{"style":136},[385],{"type":37,"value":386}," products",{"type":32,"tag":79,"props":388,"children":389},{"style":86},[390],{"type":37,"value":391}," =",{"type":32,"tag":79,"props":393,"children":394},{"style":86},[395],{"type":37,"value":396}," await",{"type":32,"tag":79,"props":398,"children":399},{"style":97},[400],{"type":37,"value":401}," fetchProductSlugs",{"type":32,"tag":79,"props":403,"children":404},{"style":103},[405],{"type":37,"value":406},"() ",{"type":32,"tag":79,"props":408,"children":409},{"style":274},[410],{"type":37,"value":411},"\u002F\u002F Vozmi slugs iz API\n",{"type":32,"tag":79,"props":413,"children":414},{"class":81,"line":147},[415,420,425,429,434,439],{"type":32,"tag":79,"props":416,"children":417},{"style":103},[418],{"type":37,"value":419},"    products.",{"type":32,"tag":79,"props":421,"children":422},{"style":97},[423],{"type":37,"value":424},"forEach",{"type":32,"tag":79,"props":426,"children":427},{"style":103},[428],{"type":37,"value":337},{"type":32,"tag":79,"props":430,"children":431},{"style":301},[432],{"type":37,"value":433},"slug",{"type":32,"tag":79,"props":435,"children":436},{"style":86},[437],{"type":37,"value":438}," =>",{"type":32,"tag":79,"props":440,"children":441},{"style":103},[442],{"type":37,"value":319},{"type":32,"tag":79,"props":444,"children":445},{"class":81,"line":177},[446,451,456,460,465,469,474],{"type":32,"tag":79,"props":447,"children":448},{"style":103},[449],{"type":37,"value":450},"      ctx.routes.",{"type":32,"tag":79,"props":452,"children":453},{"style":97},[454],{"type":37,"value":455},"add",{"type":32,"tag":79,"props":457,"children":458},{"style":103},[459],{"type":37,"value":337},{"type":32,"tag":79,"props":461,"children":462},{"style":156},[463],{"type":37,"value":464},"`\u002Fproducts\u002F${",{"type":32,"tag":79,"props":466,"children":467},{"style":103},[468],{"type":37,"value":433},{"type":32,"tag":79,"props":470,"children":471},{"style":156},[472],{"type":37,"value":473},"}`",{"type":32,"tag":79,"props":475,"children":476},{"style":103},[477],{"type":37,"value":478},")\n",{"type":32,"tag":79,"props":480,"children":481},{"class":81,"line":205},[482],{"type":32,"tag":79,"props":483,"children":484},{"style":103},[485],{"type":37,"value":486},"    })\n",{"type":32,"tag":79,"props":488,"children":489},{"class":81,"line":214},[490],{"type":32,"tag":79,"props":491,"children":492},{"style":103},[493],{"type":37,"value":494},"  })\n",{"type":32,"tag":79,"props":496,"children":497},{"class":81,"line":26},[498],{"type":32,"tag":79,"props":499,"children":500},{"style":103},[501],{"type":37,"value":228},{"type":32,"tag":33,"props":503,"children":504},{},[505,507,513],{"type":37,"value":506},"Etot shablonv pozvolyaet, vo vremya sborki, vyborochno izvlech' katalog marshrutov iz vneshnih istochnikov (CMS, baza dannykhv, headless commerce API) i zapsat' statichnyy HTML v direktoriy ",{"type":32,"tag":52,"props":508,"children":510},{"className":509},[],[511],{"type":37,"value":512},".output\u002Fpublic",{"type":37,"value":514},". Mozhno prerenderit' 5 tysyach tovarov iz Shopify Storefront API i razvernut' na Cloudflare Pages — TTFB ostanetсya nizhe 20ms.",{"type":32,"tag":40,"props":516,"children":518},{"id":517},"route-rules-gibridnaya-strategiya-renderirovaniya",[519],{"type":37,"value":520},"Route Rules: Gibridnaya Strategiya Renderirovaniya",{"type":32,"tag":33,"props":522,"children":523},{},[524,526,532,534,543],{"type":37,"value":525},"Samaya moshchnaya vozmozhnost' Nuxt 3 — konfigurirovaniye rezhima renderirovaniya na urovne marshruta. S pomoshch'yu ",{"type":32,"tag":52,"props":527,"children":529},{"className":528},[],[530],{"type":37,"value":531},"routeRules",{"type":37,"value":533}," mozhno odin shlafran renderit' kak SSG, drugoy kak SSR, tretiy v rezhime SPA. Eto kritichno dlya ",{"type":32,"tag":535,"props":536,"children":540},"a",{"href":537,"rel":538},"https:\u002F\u002Fwww.roibase.com.tr\u002Fru\u002Fheadless",[539],"nofollow",[541],{"type":37,"value":542},"headless commerce",{"type":37,"value":544}," proyektov — tovarnyye stranicy statichnyye, stranica korziny — client-side, oformleniye zakazа SSR.",{"type":32,"tag":69,"props":546,"children":548},{"className":71,"code":547,"language":73,"meta":16,"style":16},"export default defineNuxtConfig({\n  routeRules: {\n    '\u002F': { prerender: true },\n    '\u002Fproducts\u002F**': { prerender: true },\n    '\u002Fapi\u002F**': { cors: true },\n    '\u002Fadmin\u002F**': { ssr: false },\n    '\u002Fcart': { ssr: false }\n  }\n})\n",[549],{"type":32,"tag":52,"props":550,"children":551},{"__ignoreMap":16},[552,571,579,601,621,642,664,685,692],{"type":32,"tag":79,"props":553,"children":554},{"class":81,"line":82},[555,559,563,567],{"type":32,"tag":79,"props":556,"children":557},{"style":86},[558],{"type":37,"value":89},{"type":32,"tag":79,"props":560,"children":561},{"style":86},[562],{"type":37,"value":94},{"type":32,"tag":79,"props":564,"children":565},{"style":97},[566],{"type":37,"value":100},{"type":32,"tag":79,"props":568,"children":569},{"style":103},[570],{"type":37,"value":106},{"type":32,"tag":79,"props":572,"children":573},{"class":81,"line":109},[574],{"type":32,"tag":79,"props":575,"children":576},{"style":103},[577],{"type":37,"value":578},"  routeRules: {\n",{"type":32,"tag":79,"props":580,"children":581},{"class":81,"line":118},[582,587,592,596],{"type":32,"tag":79,"props":583,"children":584},{"style":156},[585],{"type":37,"value":586},"    '\u002F'",{"type":32,"tag":79,"props":588,"children":589},{"style":103},[590],{"type":37,"value":591},": { prerender: ",{"type":32,"tag":79,"props":593,"children":594},{"style":136},[595],{"type":37,"value":139},{"type":32,"tag":79,"props":597,"children":598},{"style":103},[599],{"type":37,"value":600}," },\n",{"type":32,"tag":79,"props":602,"children":603},{"class":81,"line":127},[604,609,613,617],{"type":32,"tag":79,"props":605,"children":606},{"style":156},[607],{"type":37,"value":608},"    '\u002Fproducts\u002F**'",{"type":32,"tag":79,"props":610,"children":611},{"style":103},[612],{"type":37,"value":591},{"type":32,"tag":79,"props":614,"children":615},{"style":136},[616],{"type":37,"value":139},{"type":32,"tag":79,"props":618,"children":619},{"style":103},[620],{"type":37,"value":600},{"type":32,"tag":79,"props":622,"children":623},{"class":81,"line":147},[624,629,634,638],{"type":32,"tag":79,"props":625,"children":626},{"style":156},[627],{"type":37,"value":628},"    '\u002Fapi\u002F**'",{"type":32,"tag":79,"props":630,"children":631},{"style":103},[632],{"type":37,"value":633},": { cors: ",{"type":32,"tag":79,"props":635,"children":636},{"style":136},[637],{"type":37,"value":139},{"type":32,"tag":79,"props":639,"children":640},{"style":103},[641],{"type":37,"value":600},{"type":32,"tag":79,"props":643,"children":644},{"class":81,"line":177},[645,650,655,660],{"type":32,"tag":79,"props":646,"children":647},{"style":156},[648],{"type":37,"value":649},"    '\u002Fadmin\u002F**'",{"type":32,"tag":79,"props":651,"children":652},{"style":103},[653],{"type":37,"value":654},": { ssr: ",{"type":32,"tag":79,"props":656,"children":657},{"style":136},[658],{"type":37,"value":659},"false",{"type":32,"tag":79,"props":661,"children":662},{"style":103},[663],{"type":37,"value":600},{"type":32,"tag":79,"props":665,"children":666},{"class":81,"line":205},[667,672,676,680],{"type":32,"tag":79,"props":668,"children":669},{"style":156},[670],{"type":37,"value":671},"    '\u002Fcart'",{"type":32,"tag":79,"props":673,"children":674},{"style":103},[675],{"type":37,"value":654},{"type":32,"tag":79,"props":677,"children":678},{"style":136},[679],{"type":37,"value":659},{"type":32,"tag":79,"props":681,"children":682},{"style":103},[683],{"type":37,"value":684}," }\n",{"type":32,"tag":79,"props":686,"children":687},{"class":81,"line":214},[688],{"type":32,"tag":79,"props":689,"children":690},{"style":103},[691],{"type":37,"value":220},{"type":32,"tag":79,"props":693,"children":694},{"class":81,"line":26},[695],{"type":32,"tag":79,"props":696,"children":697},{"style":103},[698],{"type":37,"value":228},{"type":32,"tag":33,"props":700,"children":701},{},[702],{"type":37,"value":703},"Eto konfigurirovaniye vypolnyaet sleduyushchee:",{"type":32,"tag":705,"props":706,"children":707},"ul",{},[708,722,735,748],{"type":32,"tag":709,"props":710,"children":711},"li",{},[712,714,720],{"type":37,"value":713},"Domashnyaya stranica i vse marshruty ",{"type":32,"tag":52,"props":715,"children":717},{"className":716},[],[718],{"type":37,"value":719},"\u002Fproducts\u002F*",{"type":37,"value":721}," prerenderiruyutsya v vremya sborki (SSG)",{"type":32,"tag":709,"props":723,"children":724},{},[725,727,733],{"type":37,"value":726},"Stranicy pod ",{"type":32,"tag":52,"props":728,"children":730},{"className":729},[],[731],{"type":37,"value":732},"\u002Fadmin",{"type":37,"value":734}," rabotayut v rezhime SPA (client-side rendering)",{"type":32,"tag":709,"props":736,"children":737},{},[738,740,746],{"type":37,"value":739},"Stranica ",{"type":32,"tag":52,"props":741,"children":743},{"className":742},[],[744],{"type":37,"value":745},"\u002Fcart",{"type":37,"value":747}," — client-side; sostoyanie korziny khranitsya lokalno, API zaprosy vypolnyayutsya v brauзhere",{"type":32,"tag":709,"props":749,"children":750},{},[751,753,759],{"type":37,"value":752},"Endpoint'y ",{"type":32,"tag":52,"props":754,"children":756},{"className":755},[],[757],{"type":37,"value":758},"\u002Fapi",{"type":37,"value":760}," poluchayut CORS zagolovski (middleware servera)",{"type":32,"tag":251,"props":762,"children":764},{"id":763},"isr-incremental-static-regeneration",[765],{"type":37,"value":766},"ISR (Incremental Static Regeneration)",{"type":32,"tag":33,"props":768,"children":769},{},[770,772,778],{"type":37,"value":771},"V Nuxt 3 ISR yeshche ne dostign urovna Next.js, no s pomoshch'yu cache strategii ",{"type":32,"tag":52,"props":773,"children":775},{"className":774},[],[776],{"type":37,"value":777},"swr",{"type":37,"value":779}," mozhno dostich' podobnogo povedeniua:",{"type":32,"tag":69,"props":781,"children":783},{"className":71,"code":782,"language":73,"meta":16,"style":16},"routeRules: {\n  '\u002Fblog\u002F**': { swr: 3600 } \u002F\u002F Cache na 1 chas, potom revalidirovat'\n}\n",[784],{"type":32,"tag":52,"props":785,"children":786},{"__ignoreMap":16},[787,799,827],{"type":32,"tag":79,"props":788,"children":789},{"class":81,"line":82},[790,794],{"type":32,"tag":79,"props":791,"children":792},{"style":97},[793],{"type":37,"value":531},{"type":32,"tag":79,"props":795,"children":796},{"style":103},[797],{"type":37,"value":798},": {\n",{"type":32,"tag":79,"props":800,"children":801},{"class":81,"line":109},[802,807,812,817,822],{"type":32,"tag":79,"props":803,"children":804},{"style":156},[805],{"type":37,"value":806},"  '\u002Fblog\u002F**'",{"type":32,"tag":79,"props":808,"children":809},{"style":103},[810],{"type":37,"value":811},": { swr: ",{"type":32,"tag":79,"props":813,"children":814},{"style":136},[815],{"type":37,"value":816},"3600",{"type":32,"tag":79,"props":818,"children":819},{"style":103},[820],{"type":37,"value":821}," } ",{"type":32,"tag":79,"props":823,"children":824},{"style":274},[825],{"type":37,"value":826},"\u002F\u002F Cache na 1 chas, potom revalidirovat'\n",{"type":32,"tag":79,"props":828,"children":829},{"class":81,"line":118},[830],{"type":32,"tag":79,"props":831,"children":832},{"style":103},[833],{"type":37,"value":834},"}\n",{"type":32,"tag":33,"props":836,"children":837},{},[838,839,845],{"type":37,"value":233},{"type":32,"tag":52,"props":840,"children":842},{"className":841},[],[843],{"type":37,"value":844},"swr: 3600",{"type":37,"value":846}," oznachaet: pervyy posyetitel' poluchaet statichnyy HTML, cache istekayot cherez 1 chas, sleduyushchiy zapros triggeryot novy render, no starый cache pokazyvayetsya (stale-while-revalidate). Eto podkhodit dlya saytov, trebuyushchikh daily updatov, no ne nuzhda v polnoy perestroike kazhdoй sborki. V production, s edge cache'om CDN (Cloudflare, Vercel), TTFB ostanetсya nizhe 50ms.",{"type":32,"tag":40,"props":848,"children":850},{"id":849},"optimizaciya-sborki-parallelnyy-rendering-i-splitting-chastey",[851],{"type":37,"value":852},"Optimizaciya Sborki: Parallel'nyy Rendering i Splitting Chastey",{"type":32,"tag":33,"props":854,"children":855},{},[856,858,864],{"type":37,"value":857},"Kogda sborish' sayt s 5 tysyachami stranic pomoshch'yu ",{"type":32,"tag":52,"props":859,"children":861},{"className":860},[],[862],{"type":37,"value":863},"nuxt generate",{"type":37,"value":865}," s default settings, vremya sborki mozhet dostignut' 15-20 minut. Chtoby sniziт' eto do 5 minut, trebuetsya parallel'nyy rendering i smart chunk splitting.",{"type":32,"tag":69,"props":867,"children":869},{"className":71,"code":868,"language":73,"meta":16,"style":16},"export default defineNuxtConfig({\n  nitro: {\n    prerender: {\n      concurrency: 20,    \u002F\u002F Paralel'nye worker'y dlya renderirovaniya\n      interval: 100,      \u002F\u002F Zaderzhka mezhdu worker'ami (ms)\n      crawlLinks: false   \u002F\u002F Ispol'zuj ruchnoy inject marshrutov\n    }\n  },\n  vite: {\n    build: {\n      rollupOptions: {\n        output: {\n          manualChunks: {\n            'vendor-vue': ['vue', 'vue-router'],\n            'vendor-ui': ['@headlessui\u002Fvue', '@heroicons\u002Fvue']\n          }\n        }\n      }\n    }\n  }\n})\n",[870],{"type":32,"tag":52,"props":871,"children":872},{"__ignoreMap":16},[873,892,899,906,929,952,968,975,983,991,1000,1009,1018,1027,1059,1090,1099,1108,1117,1125,1133],{"type":32,"tag":79,"props":874,"children":875},{"class":81,"line":82},[876,880,884,888],{"type":32,"tag":79,"props":877,"children":878},{"style":86},[879],{"type":37,"value":89},{"type":32,"tag":79,"props":881,"children":882},{"style":86},[883],{"type":37,"value":94},{"type":32,"tag":79,"props":885,"children":886},{"style":97},[887],{"type":37,"value":100},{"type":32,"tag":79,"props":889,"children":890},{"style":103},[891],{"type":37,"value":106},{"type":32,"tag":79,"props":893,"children":894},{"class":81,"line":109},[895],{"type":32,"tag":79,"props":896,"children":897},{"style":103},[898],{"type":37,"value":115},{"type":32,"tag":79,"props":900,"children":901},{"class":81,"line":118},[902],{"type":32,"tag":79,"props":903,"children":904},{"style":103},[905],{"type":37,"value":124},{"type":32,"tag":79,"props":907,"children":908},{"class":81,"line":127},[909,914,919,924],{"type":32,"tag":79,"props":910,"children":911},{"style":103},[912],{"type":37,"value":913},"      concurrency: ",{"type":32,"tag":79,"props":915,"children":916},{"style":136},[917],{"type":37,"value":918},"20",{"type":32,"tag":79,"props":920,"children":921},{"style":103},[922],{"type":37,"value":923},",    ",{"type":32,"tag":79,"props":925,"children":926},{"style":274},[927],{"type":37,"value":928},"\u002F\u002F Paralel'nye worker'y dlya renderirovaniya\n",{"type":32,"tag":79,"props":930,"children":931},{"class":81,"line":147},[932,937,942,947],{"type":32,"tag":79,"props":933,"children":934},{"style":103},[935],{"type":37,"value":936},"      interval: ",{"type":32,"tag":79,"props":938,"children":939},{"style":136},[940],{"type":37,"value":941},"100",{"type":32,"tag":79,"props":943,"children":944},{"style":103},[945],{"type":37,"value":946},",      ",{"type":32,"tag":79,"props":948,"children":949},{"style":274},[950],{"type":37,"value":951},"\u002F\u002F Zaderzhka mezhdu worker'ami (ms)\n",{"type":32,"tag":79,"props":953,"children":954},{"class":81,"line":177},[955,959,963],{"type":32,"tag":79,"props":956,"children":957},{"style":103},[958],{"type":37,"value":133},{"type":32,"tag":79,"props":960,"children":961},{"style":136},[962],{"type":37,"value":659},{"type":32,"tag":79,"props":964,"children":965},{"style":274},[966],{"type":37,"value":967},"   \u002F\u002F Ispol'zuj ruchnoy inject marshrutov\n",{"type":32,"tag":79,"props":969,"children":970},{"class":81,"line":205},[971],{"type":32,"tag":79,"props":972,"children":973},{"style":103},[974],{"type":37,"value":211},{"type":32,"tag":79,"props":976,"children":977},{"class":81,"line":214},[978],{"type":32,"tag":79,"props":979,"children":980},{"style":103},[981],{"type":37,"value":982},"  },\n",{"type":32,"tag":79,"props":984,"children":985},{"class":81,"line":26},[986],{"type":32,"tag":79,"props":987,"children":988},{"style":103},[989],{"type":37,"value":990},"  vite: {\n",{"type":32,"tag":79,"props":992,"children":994},{"class":81,"line":993},10,[995],{"type":32,"tag":79,"props":996,"children":997},{"style":103},[998],{"type":37,"value":999},"    build: {\n",{"type":32,"tag":79,"props":1001,"children":1003},{"class":81,"line":1002},11,[1004],{"type":32,"tag":79,"props":1005,"children":1006},{"style":103},[1007],{"type":37,"value":1008},"      rollupOptions: {\n",{"type":32,"tag":79,"props":1010,"children":1012},{"class":81,"line":1011},12,[1013],{"type":32,"tag":79,"props":1014,"children":1015},{"style":103},[1016],{"type":37,"value":1017},"        output: {\n",{"type":32,"tag":79,"props":1019,"children":1021},{"class":81,"line":1020},13,[1022],{"type":32,"tag":79,"props":1023,"children":1024},{"style":103},[1025],{"type":37,"value":1026},"          manualChunks: {\n",{"type":32,"tag":79,"props":1028,"children":1030},{"class":81,"line":1029},14,[1031,1036,1041,1046,1050,1055],{"type":32,"tag":79,"props":1032,"children":1033},{"style":156},[1034],{"type":37,"value":1035},"            'vendor-vue'",{"type":32,"tag":79,"props":1037,"children":1038},{"style":103},[1039],{"type":37,"value":1040},": [",{"type":32,"tag":79,"props":1042,"children":1043},{"style":156},[1044],{"type":37,"value":1045},"'vue'",{"type":32,"tag":79,"props":1047,"children":1048},{"style":103},[1049],{"type":37,"value":164},{"type":32,"tag":79,"props":1051,"children":1052},{"style":156},[1053],{"type":37,"value":1054},"'vue-router'",{"type":32,"tag":79,"props":1056,"children":1057},{"style":103},[1058],{"type":37,"value":174},{"type":32,"tag":79,"props":1060,"children":1062},{"class":81,"line":1061},15,[1063,1068,1072,1077,1081,1086],{"type":32,"tag":79,"props":1064,"children":1065},{"style":156},[1066],{"type":37,"value":1067},"            'vendor-ui'",{"type":32,"tag":79,"props":1069,"children":1070},{"style":103},[1071],{"type":37,"value":1040},{"type":32,"tag":79,"props":1073,"children":1074},{"style":156},[1075],{"type":37,"value":1076},"'@headlessui\u002Fvue'",{"type":32,"tag":79,"props":1078,"children":1079},{"style":103},[1080],{"type":37,"value":164},{"type":32,"tag":79,"props":1082,"children":1083},{"style":156},[1084],{"type":37,"value":1085},"'@heroicons\u002Fvue'",{"type":32,"tag":79,"props":1087,"children":1088},{"style":103},[1089],{"type":37,"value":202},{"type":32,"tag":79,"props":1091,"children":1093},{"class":81,"line":1092},16,[1094],{"type":32,"tag":79,"props":1095,"children":1096},{"style":103},[1097],{"type":37,"value":1098},"          }\n",{"type":32,"tag":79,"props":1100,"children":1102},{"class":81,"line":1101},17,[1103],{"type":32,"tag":79,"props":1104,"children":1105},{"style":103},[1106],{"type":37,"value":1107},"        }\n",{"type":32,"tag":79,"props":1109,"children":1111},{"class":81,"line":1110},18,[1112],{"type":32,"tag":79,"props":1113,"children":1114},{"style":103},[1115],{"type":37,"value":1116},"      }\n",{"type":32,"tag":79,"props":1118,"children":1120},{"class":81,"line":1119},19,[1121],{"type":32,"tag":79,"props":1122,"children":1123},{"style":103},[1124],{"type":37,"value":211},{"type":32,"tag":79,"props":1126,"children":1128},{"class":81,"line":1127},20,[1129],{"type":32,"tag":79,"props":1130,"children":1131},{"style":103},[1132],{"type":37,"value":220},{"type":32,"tag":79,"props":1134,"children":1136},{"class":81,"line":1135},21,[1137],{"type":32,"tag":79,"props":1138,"children":1139},{"style":103},[1140],{"type":37,"value":228},{"type":32,"tag":33,"props":1142,"children":1143},{},[1144,1145,1151,1153,1159],{"type":37,"value":233},{"type":32,"tag":52,"props":1146,"children":1148},{"className":1147},[],[1149],{"type":37,"value":1150},"concurrency: 20",{"type":37,"value":1152}," renderit 20 stranic odnovremennо. Nastroy v zavisimosti ot chisla CPU core'ov — na 8-core mekste ideal'no 20, na 4-core — 10. Parametr ",{"type":32,"tag":52,"props":1154,"children":1156},{"className":1155},[],[1157],{"type":37,"value":1158},"interval: 100",{"type":37,"value":1160}," — dlya togo chtoby ne upast' v rate limit API. Esli Shopify API imeet limit 2 zaprosa v sekundu, izmenit' na 500ms.",{"type":32,"tag":251,"props":1162,"children":1164},{"id":1163},"pipeline-optimizacii-izobrazheniy",[1165],{"type":37,"value":1166},"Pipeline Optimizacii Izobrazheniy",{"type":32,"tag":33,"props":1168,"children":1169},{},[1170],{"type":37,"value":1171},"Modul' Nuxt Image optimizirует izobrazheniya v vremya sborki, no default settings nedostatochny dlya production. Parallel'naya generaciya WebP + AVIF formatov udvaivayет vremya sborki, no FID (First Input Delay) padaet na 40ms:",{"type":32,"tag":69,"props":1173,"children":1175},{"className":71,"code":1174,"language":73,"meta":16,"style":16},"export default defineNuxtConfig({\n  image: {\n    provider: 'ipx',\n    ipx: {\n      maxAge: 31536000 \u002F\u002F 1 god cache\n    },\n    formats: ['webp', 'avif'],\n    screens: {\n      xs: 320,\n      sm: 640,\n      md: 768,\n      lg: 1024,\n      xl: 1280\n    }\n  }\n})\n",[1176],{"type":32,"tag":52,"props":1177,"children":1178},{"__ignoreMap":16},[1179,1198,1206,1223,1231,1249,1257,1283,1291,1308,1325,1342,1359,1372,1379,1386],{"type":32,"tag":79,"props":1180,"children":1181},{"class":81,"line":82},[1182,1186,1190,1194],{"type":32,"tag":79,"props":1183,"children":1184},{"style":86},[1185],{"type":37,"value":89},{"type":32,"tag":79,"props":1187,"children":1188},{"style":86},[1189],{"type":37,"value":94},{"type":32,"tag":79,"props":1191,"children":1192},{"style":97},[1193],{"type":37,"value":100},{"type":32,"tag":79,"props":1195,"children":1196},{"style":103},[1197],{"type":37,"value":106},{"type":32,"tag":79,"props":1199,"children":1200},{"class":81,"line":109},[1201],{"type":32,"tag":79,"props":1202,"children":1203},{"style":103},[1204],{"type":37,"value":1205},"  image: {\n",{"type":32,"tag":79,"props":1207,"children":1208},{"class":81,"line":118},[1209,1214,1219],{"type":32,"tag":79,"props":1210,"children":1211},{"style":103},[1212],{"type":37,"value":1213},"    provider: ",{"type":32,"tag":79,"props":1215,"children":1216},{"style":156},[1217],{"type":37,"value":1218},"'ipx'",{"type":32,"tag":79,"props":1220,"children":1221},{"style":103},[1222],{"type":37,"value":144},{"type":32,"tag":79,"props":1224,"children":1225},{"class":81,"line":127},[1226],{"type":32,"tag":79,"props":1227,"children":1228},{"style":103},[1229],{"type":37,"value":1230},"    ipx: {\n",{"type":32,"tag":79,"props":1232,"children":1233},{"class":81,"line":147},[1234,1239,1244],{"type":32,"tag":79,"props":1235,"children":1236},{"style":103},[1237],{"type":37,"value":1238},"      maxAge: ",{"type":32,"tag":79,"props":1240,"children":1241},{"style":136},[1242],{"type":37,"value":1243},"31536000",{"type":32,"tag":79,"props":1245,"children":1246},{"style":274},[1247],{"type":37,"value":1248}," \u002F\u002F 1 god cache\n",{"type":32,"tag":79,"props":1250,"children":1251},{"class":81,"line":177},[1252],{"type":32,"tag":79,"props":1253,"children":1254},{"style":103},[1255],{"type":37,"value":1256},"    },\n",{"type":32,"tag":79,"props":1258,"children":1259},{"class":81,"line":205},[1260,1265,1270,1274,1279],{"type":32,"tag":79,"props":1261,"children":1262},{"style":103},[1263],{"type":37,"value":1264},"    formats: [",{"type":32,"tag":79,"props":1266,"children":1267},{"style":156},[1268],{"type":37,"value":1269},"'webp'",{"type":32,"tag":79,"props":1271,"children":1272},{"style":103},[1273],{"type":37,"value":164},{"type":32,"tag":79,"props":1275,"children":1276},{"style":156},[1277],{"type":37,"value":1278},"'avif'",{"type":32,"tag":79,"props":1280,"children":1281},{"style":103},[1282],{"type":37,"value":174},{"type":32,"tag":79,"props":1284,"children":1285},{"class":81,"line":214},[1286],{"type":32,"tag":79,"props":1287,"children":1288},{"style":103},[1289],{"type":37,"value":1290},"    screens: {\n",{"type":32,"tag":79,"props":1292,"children":1293},{"class":81,"line":26},[1294,1299,1304],{"type":32,"tag":79,"props":1295,"children":1296},{"style":103},[1297],{"type":37,"value":1298},"      xs: ",{"type":32,"tag":79,"props":1300,"children":1301},{"style":136},[1302],{"type":37,"value":1303},"320",{"type":32,"tag":79,"props":1305,"children":1306},{"style":103},[1307],{"type":37,"value":144},{"type":32,"tag":79,"props":1309,"children":1310},{"class":81,"line":993},[1311,1316,1321],{"type":32,"tag":79,"props":1312,"children":1313},{"style":103},[1314],{"type":37,"value":1315},"      sm: ",{"type":32,"tag":79,"props":1317,"children":1318},{"style":136},[1319],{"type":37,"value":1320},"640",{"type":32,"tag":79,"props":1322,"children":1323},{"style":103},[1324],{"type":37,"value":144},{"type":32,"tag":79,"props":1326,"children":1327},{"class":81,"line":1002},[1328,1333,1338],{"type":32,"tag":79,"props":1329,"children":1330},{"style":103},[1331],{"type":37,"value":1332},"      md: ",{"type":32,"tag":79,"props":1334,"children":1335},{"style":136},[1336],{"type":37,"value":1337},"768",{"type":32,"tag":79,"props":1339,"children":1340},{"style":103},[1341],{"type":37,"value":144},{"type":32,"tag":79,"props":1343,"children":1344},{"class":81,"line":1011},[1345,1350,1355],{"type":32,"tag":79,"props":1346,"children":1347},{"style":103},[1348],{"type":37,"value":1349},"      lg: ",{"type":32,"tag":79,"props":1351,"children":1352},{"style":136},[1353],{"type":37,"value":1354},"1024",{"type":32,"tag":79,"props":1356,"children":1357},{"style":103},[1358],{"type":37,"value":144},{"type":32,"tag":79,"props":1360,"children":1361},{"class":81,"line":1020},[1362,1367],{"type":32,"tag":79,"props":1363,"children":1364},{"style":103},[1365],{"type":37,"value":1366},"      xl: ",{"type":32,"tag":79,"props":1368,"children":1369},{"style":136},[1370],{"type":37,"value":1371},"1280\n",{"type":32,"tag":79,"props":1373,"children":1374},{"class":81,"line":1029},[1375],{"type":32,"tag":79,"props":1376,"children":1377},{"style":103},[1378],{"type":37,"value":211},{"type":32,"tag":79,"props":1380,"children":1381},{"class":81,"line":1061},[1382],{"type":32,"tag":79,"props":1383,"children":1384},{"style":103},[1385],{"type":37,"value":220},{"type":32,"tag":79,"props":1387,"children":1388},{"class":81,"line":1092},[1389],{"type":32,"tag":79,"props":1390,"children":1391},{"style":103},[1392],{"type":37,"value":228},{"type":32,"tag":33,"props":1394,"children":1395},{},[1396],{"type":37,"value":1397},"Eto nastroika generirует responsive izobrazheniya — dlya kazhdogo izobrazheniя 5 breakpoint'ov × 2 formata = 10 faylov. Na sayte s 1000 izobrazheniy vremya sborki vozrastaet na +3 minuty, no LCP (Largest Contentful Paint) padaet s 2,5s do 1,2s. Balans jasno v pol'zu: vremya sborki priemlemо, opyt pol'zovatelya kritichno ul'uchshayetsya.",{"type":32,"tag":40,"props":1399,"children":1401},{"id":1400},"production-deployment-edge-cache-cdn",[1402],{"type":37,"value":1403},"Production Deployment: Edge Cache CDN",{"type":32,"tag":33,"props":1405,"children":1406},{},[1407,1409,1414],{"type":37,"value":1408},"Posle zapisi SSG sborki v direktoriy ",{"type":32,"tag":52,"props":1410,"children":1412},{"className":1411},[],[1413],{"type":37,"value":512},{"type":37,"value":1415},", strategiya deploymenta stanovitsya kriticheskoy. Platformy kak Cloudflare Pages, Vercel, Netlify avtomaticheski vypolnyayut edge caching, no manual'naya konfiguratsiya cache zagolovski – neobkhоdima:",{"type":32,"tag":69,"props":1417,"children":1419},{"className":71,"code":1418,"language":73,"meta":16,"style":16},"\u002F\u002F server\u002Fmiddleware\u002Fcache-headers.ts\nexport default defineEventHandler((event) => {\n  const url = event.node.req.url\n  \n  if (url?.startsWith('\u002Fproducts\u002F')) {\n    setResponseHeaders(event, {\n      'Cache-Control': 'public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800'\n    })\n  }\n  \n  if (url?.startsWith('\u002F_nuxt\u002F')) {\n    setResponseHeaders(event, {\n      'Cache-Control': 'public, max-age=31536000, immutable'\n    })\n  }\n})\n",[1420],{"type":32,"tag":52,"props":1421,"children":1422},{"__ignoreMap":16},[1423,1431,1468,1490,1498,1530,1543,1561,1568,1575,1582,1610,1621,1637,1644,1651],{"type":32,"tag":79,"props":1424,"children":1425},{"class":81,"line":82},[1426],{"type":32,"tag":79,"props":1427,"children":1428},{"style":274},[1429],{"type":37,"value":1430},"\u002F\u002F server\u002Fmiddleware\u002Fcache-headers.ts\n",{"type":32,"tag":79,"props":1432,"children":1433},{"class":81,"line":109},[1434,1438,1442,1447,1451,1456,1460,1464],{"type":32,"tag":79,"props":1435,"children":1436},{"style":86},[1437],{"type":37,"value":89},{"type":32,"tag":79,"props":1439,"children":1440},{"style":86},[1441],{"type":37,"value":94},{"type":32,"tag":79,"props":1443,"children":1444},{"style":97},[1445],{"type":37,"value":1446}," defineEventHandler",{"type":32,"tag":79,"props":1448,"children":1449},{"style":103},[1450],{"type":37,"value":298},{"type":32,"tag":79,"props":1452,"children":1453},{"style":301},[1454],{"type":37,"value":1455},"event",{"type":32,"tag":79,"props":1457,"children":1458},{"style":103},[1459],{"type":37,"value":309},{"type":32,"tag":79,"props":1461,"children":1462},{"style":86},[1463],{"type":37,"value":314},{"type":32,"tag":79,"props":1465,"children":1466},{"style":103},[1467],{"type":37,"value":319},{"type":32,"tag":79,"props":1469,"children":1470},{"class":81,"line":118},[1471,1476,1481,1485],{"type":32,"tag":79,"props":1472,"children":1473},{"style":86},[1474],{"type":37,"value":1475},"  const",{"type":32,"tag":79,"props":1477,"children":1478},{"style":136},[1479],{"type":37,"value":1480}," url",{"type":32,"tag":79,"props":1482,"children":1483},{"style":86},[1484],{"type":37,"value":391},{"type":32,"tag":79,"props":1486,"children":1487},{"style":103},[1488],{"type":37,"value":1489}," event.node.req.url\n",{"type":32,"tag":79,"props":1491,"children":1492},{"class":81,"line":127},[1493],{"type":32,"tag":79,"props":1494,"children":1495},{"style":103},[1496],{"type":37,"value":1497},"  \n",{"type":32,"tag":79,"props":1499,"children":1500},{"class":81,"line":147},[1501,1506,1511,1516,1520,1525],{"type":32,"tag":79,"props":1502,"children":1503},{"style":86},[1504],{"type":37,"value":1505},"  if",{"type":32,"tag":79,"props":1507,"children":1508},{"style":103},[1509],{"type":37,"value":1510}," (url?.",{"type":32,"tag":79,"props":1512,"children":1513},{"style":97},[1514],{"type":37,"value":1515},"startsWith",{"type":32,"tag":79,"props":1517,"children":1518},{"style":103},[1519],{"type":37,"value":337},{"type":32,"tag":79,"props":1521,"children":1522},{"style":156},[1523],{"type":37,"value":1524},"'\u002Fproducts\u002F'",{"type":32,"tag":79,"props":1526,"children":1527},{"style":103},[1528],{"type":37,"value":1529},")) {\n",{"type":32,"tag":79,"props":1531,"children":1532},{"class":81,"line":177},[1533,1538],{"type":32,"tag":79,"props":1534,"children":1535},{"style":97},[1536],{"type":37,"value":1537},"    setResponseHeaders",{"type":32,"tag":79,"props":1539,"children":1540},{"style":103},[1541],{"type":37,"value":1542},"(event, {\n",{"type":32,"tag":79,"props":1544,"children":1545},{"class":81,"line":205},[1546,1551,1556],{"type":32,"tag":79,"props":1547,"children":1548},{"style":156},[1549],{"type":37,"value":1550},"      'Cache-Control'",{"type":32,"tag":79,"props":1552,"children":1553},{"style":103},[1554],{"type":37,"value":1555},": ",{"type":32,"tag":79,"props":1557,"children":1558},{"style":156},[1559],{"type":37,"value":1560},"'public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800'\n",{"type":32,"tag":79,"props":1562,"children":1563},{"class":81,"line":214},[1564],{"type":32,"tag":79,"props":1565,"children":1566},{"style":103},[1567],{"type":37,"value":486},{"type":32,"tag":79,"props":1569,"children":1570},{"class":81,"line":26},[1571],{"type":32,"tag":79,"props":1572,"children":1573},{"style":103},[1574],{"type":37,"value":220},{"type":32,"tag":79,"props":1576,"children":1577},{"class":81,"line":993},[1578],{"type":32,"tag":79,"props":1579,"children":1580},{"style":103},[1581],{"type":37,"value":1497},{"type":32,"tag":79,"props":1583,"children":1584},{"class":81,"line":1002},[1585,1589,1593,1597,1601,1606],{"type":32,"tag":79,"props":1586,"children":1587},{"style":86},[1588],{"type":37,"value":1505},{"type":32,"tag":79,"props":1590,"children":1591},{"style":103},[1592],{"type":37,"value":1510},{"type":32,"tag":79,"props":1594,"children":1595},{"style":97},[1596],{"type":37,"value":1515},{"type":32,"tag":79,"props":1598,"children":1599},{"style":103},[1600],{"type":37,"value":337},{"type":32,"tag":79,"props":1602,"children":1603},{"style":156},[1604],{"type":37,"value":1605},"'\u002F_nuxt\u002F'",{"type":32,"tag":79,"props":1607,"children":1608},{"style":103},[1609],{"type":37,"value":1529},{"type":32,"tag":79,"props":1611,"children":1612},{"class":81,"line":1011},[1613,1617],{"type":32,"tag":79,"props":1614,"children":1615},{"style":97},[1616],{"type":37,"value":1537},{"type":32,"tag":79,"props":1618,"children":1619},{"style":103},[1620],{"type":37,"value":1542},{"type":32,"tag":79,"props":1622,"children":1623},{"class":81,"line":1020},[1624,1628,1632],{"type":32,"tag":79,"props":1625,"children":1626},{"style":156},[1627],{"type":37,"value":1550},{"type":32,"tag":79,"props":1629,"children":1630},{"style":103},[1631],{"type":37,"value":1555},{"type":32,"tag":79,"props":1633,"children":1634},{"style":156},[1635],{"type":37,"value":1636},"'public, max-age=31536000, immutable'\n",{"type":32,"tag":79,"props":1638,"children":1639},{"class":81,"line":1029},[1640],{"type":32,"tag":79,"props":1641,"children":1642},{"style":103},[1643],{"type":37,"value":486},{"type":32,"tag":79,"props":1645,"children":1646},{"class":81,"line":1061},[1647],{"type":32,"tag":79,"props":1648,"children":1649},{"style":103},[1650],{"type":37,"value":220},{"type":32,"tag":79,"props":1652,"children":1653},{"class":81,"line":1092},[1654],{"type":32,"tag":79,"props":1655,"children":1656},{"style":103},[1657],{"type":37,"value":228},{"type":32,"tag":33,"props":1659,"children":1660},{},[1661],{"type":37,"value":1662},"Eto middleware vypolnyaet sleduyushchee:",{"type":32,"tag":705,"props":1664,"children":1665},{},[1666,1678],{"type":32,"tag":709,"props":1667,"children":1668},{},[1669,1671,1676],{"type":37,"value":1670},"Marshruty ",{"type":32,"tag":52,"props":1672,"children":1674},{"className":1673},[],[1675],{"type":37,"value":719},{"type":37,"value":1677}," cachiruyutsya na 1 chas v brauзhere, na 1 den v CDN, stale cache serviruetsya do 1 nedeli",{"type":32,"tag":709,"props":1679,"children":1680},{},[1681,1683,1689],{"type":37,"value":1682},"Staticheskie asset'y ",{"type":32,"tag":52,"props":1684,"children":1686},{"className":1685},[],[1687],{"type":37,"value":1688},"\u002F_nuxt\u002F*",{"type":37,"value":1690}," (JS, CSS) cachiruyutsya na 1 god s flagom immutable — poka hash sborki ne izmenitsya, perezagruzka ne trebuetsya",{"type":32,"tag":33,"props":1692,"children":1693},{},[1694],{"type":37,"value":1695},"Po dannym Cloudflare Analytics: cache hit rate vozrastaet s 92% do 98%, srednyy TTFB padaet s 180ms do 25ms. Bez edge caching SSG terayет svoy smysl — esli HTML statichnyy, no setevaya latentnost' tormozit proizvod nost'.",{"type":32,"tag":40,"props":1697,"children":1699},{"id":1698},"scenarii-oshibok-i-fallback-mehanizmy",[1700],{"type":37,"value":1701},"Scenarii Oshibok i Fallback Mehanizmy",{"type":32,"tag":33,"props":1703,"children":1704},{},[1705,1707,1713],{"type":37,"value":1706},"Esli vo vremya prerenderirovaniya kak-to marshrut ne vypolnitsya (timeout API, 404), sborka zavershaetsya s oshibkoy. V production dlya obrabotki takikh sluchayev v hook'e ",{"type":32,"tag":52,"props":1708,"children":1710},{"className":1709},[],[1711],{"type":37,"value":1712},"onPrerender",{"type":37,"value":1714}," trebuetsya fallback mekhanizm:",{"type":32,"tag":69,"props":1716,"children":1718},{"className":71,"code":1717,"language":73,"meta":16,"style":16},"nitroApp.hooks.hook('prerender:route', (route) => {\n  if (route.error) {\n    console.warn(`Failed to prerender: ${route.route}`)\n    route.skip = true \u002F\u002F Propsти etot marshrut, ne останavlivay sborku\n  }\n})\n",[1719],{"type":32,"tag":52,"props":1720,"children":1721},{"__ignoreMap":16},[1722,1765,1777,1820,1843,1850],{"type":32,"tag":79,"props":1723,"children":1724},{"class":81,"line":82},[1725,1730,1734,1738,1743,1748,1753,1757,1761],{"type":32,"tag":79,"props":1726,"children":1727},{"style":103},[1728],{"type":37,"value":1729},"nitroApp.hooks.",{"type":32,"tag":79,"props":1731,"children":1732},{"style":97},[1733],{"type":37,"value":332},{"type":32,"tag":79,"props":1735,"children":1736},{"style":103},[1737],{"type":37,"value":337},{"type":32,"tag":79,"props":1739,"children":1740},{"style":156},[1741],{"type":37,"value":1742},"'prerender:route'",{"type":32,"tag":79,"props":1744,"children":1745},{"style":103},[1746],{"type":37,"value":1747},", (",{"type":32,"tag":79,"props":1749,"children":1750},{"style":301},[1751],{"type":37,"value":1752},"route",{"type":32,"tag":79,"props":1754,"children":1755},{"style":103},[1756],{"type":37,"value":309},{"type":32,"tag":79,"props":1758,"children":1759},{"style":86},[1760],{"type":37,"value":314},{"type":32,"tag":79,"props":1762,"children":1763},{"style":103},[1764],{"type":37,"value":319},{"type":32,"tag":79,"props":1766,"children":1767},{"class":81,"line":109},[1768,1772],{"type":32,"tag":79,"props":1769,"children":1770},{"style":86},[1771],{"type":37,"value":1505},{"type":32,"tag":79,"props":1773,"children":1774},{"style":103},[1775],{"type":37,"value":1776}," (route.error) {\n",{"type":32,"tag":79,"props":1778,"children":1779},{"class":81,"line":118},[1780,1785,1790,1794,1799,1803,1808,1812,1816],{"type":32,"tag":79,"props":1781,"children":1782},{"style":103},[1783],{"type":37,"value":1784},"    console.",{"type":32,"tag":79,"props":1786,"children":1787},{"style":97},[1788],{"type":37,"value":1789},"warn",{"type":32,"tag":79,"props":1791,"children":1792},{"style":103},[1793],{"type":37,"value":337},{"type":32,"tag":79,"props":1795,"children":1796},{"style":156},[1797],{"type":37,"value":1798},"`Failed to prerender: ${",{"type":32,"tag":79,"props":1800,"children":1801},{"style":103},[1802],{"type":37,"value":1752},{"type":32,"tag":79,"props":1804,"children":1805},{"style":156},[1806],{"type":37,"value":1807},".",{"type":32,"tag":79,"props":1809,"children":1810},{"style":103},[1811],{"type":37,"value":1752},{"type":32,"tag":79,"props":1813,"children":1814},{"style":156},[1815],{"type":37,"value":473},{"type":32,"tag":79,"props":1817,"children":1818},{"style":103},[1819],{"type":37,"value":478},{"type":32,"tag":79,"props":1821,"children":1822},{"class":81,"line":127},[1823,1828,1833,1838],{"type":32,"tag":79,"props":1824,"children":1825},{"style":103},[1826],{"type":37,"value":1827},"    route.skip ",{"type":32,"tag":79,"props":1829,"children":1830},{"style":86},[1831],{"type":37,"value":1832},"=",{"type":32,"tag":79,"props":1834,"children":1835},{"style":136},[1836],{"type":37,"value":1837}," true",{"type":32,"tag":79,"props":1839,"children":1840},{"style":274},[1841],{"type":37,"value":1842}," \u002F\u002F Propsти etot marshrut, ne останavlivay sborku\n",{"type":32,"tag":79,"props":1844,"children":1845},{"class":81,"line":147},[1846],{"type":32,"tag":79,"props":1847,"children":1848},{"style":103},[1849],{"type":37,"value":220},{"type":32,"tag":79,"props":1851,"children":1852},{"class":81,"line":177},[1853],{"type":32,"tag":79,"props":1854,"children":1855},{"style":103},[1856],{"type":37,"value":228},{"type":32,"tag":33,"props":1858,"children":1859},{},[1860,1862,1867],{"type":37,"value":1861},"Etot shablom — esli iz 10 tysyach marshrutov fail 50, to sborka ne krakhnyotsya. Neudachno prerenderanyye marshruty mogut pokazat' fallback stranicu (404 ili genericheskuyu stranitsu tovarov). Al'ternativa: perevesti failanuvshiye marshruty na SSR — v runtime renoverit' cherez ",{"type":32,"tag":52,"props":1863,"children":1865},{"className":1864},[],[1866],{"type":37,"value":531},{"type":37,"value":1807},{"type":32,"tag":33,"props":1869,"children":1870},{},[1871],{"type":37,"value":1872},"Architektura SSG v Nuxt 3 predostavlyaet flexibility, no bez pravilnoy konfiguratsii vremya sborki i runtime performansv stayut problemy. Kombinaciya route rules dlya gibridnogo renderirovaniya, parallel'noe prerenderirovaniye, CDN cache strategiya i fallback mekhanizmy dayuт production-urovnevyy rezul'tat. Mozno sborit' 5-tysyachnostrunicnyy e-commerce sayt za 5 minut i servit' ego s TTFB 25ms — dlya etogo dostatochno znat', kakie kryuchki Nitro trebuetsya activirovat'.",{"type":32,"tag":1874,"props":1875,"children":1876},"style",{},[1877],{"type":37,"value":1878},"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":118,"depth":118,"links":1880},[1881,1884,1887,1890,1891],{"id":42,"depth":109,"text":45,"children":1882},[1883],{"id":253,"depth":118,"text":256},{"id":517,"depth":109,"text":520,"children":1885},[1886],{"id":763,"depth":118,"text":766},{"id":849,"depth":109,"text":852,"children":1888},[1889],{"id":1163,"depth":118,"text":1166},{"id":1400,"depth":109,"text":1403},{"id":1698,"depth":109,"text":1701},"markdown","content:ru:tech:ssg-strategii-dlya-nuxt-3-i-optimizaciya-sborki.md","content","ru\u002Ftech\u002Fssg-strategii-dlya-nuxt-3-i-optimizaciya-sborki.md","ru\u002Ftech\u002Fssg-strategii-dlya-nuxt-3-i-optimizaciya-sborki","md",1786860295896]