[{"data":1,"prerenderedAt":3065},["ShallowReactive",2],{"article-/topics/nuxt/nuxt-seo-module-ecosystem-guide":3,"related-nuxt":432,"content-query-C627vkS4Fr":2745},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":12,"image":18,"imageQuery":19,"pexelsPhotoId":20,"pexelsUrl":21,"featured":6,"readingTime":22,"body":23,"_type":426,"_id":427,"_source":428,"_file":429,"_stem":430,"_extension":431},"/topics/nuxt/nuxt-seo-module-ecosystem-guide","nuxt",false,"","Nuxt SEO 模块全家桶：从站点元信息到结构化数据的系统组合","Nuxt 做 SEO 并不只是 useHead。本文从 sitemap、robots、schema、图片优化和内容路由管理出发，系统梳理 Nuxt SEO 模块生态的职责分工与组合方式。","2026-04-23","HTMLPAGE 团队",[13,14,15,16,17],"Nuxt","SEO","Sitemap","Structured Data","Module Ecosystem","/images/topics/nuxt/nuxt-seo-module-ecosystem-guide.jpg","seo analytics website optimization dashboard on screen",6986455,"https://www.pexels.com/photo/google-browser-on-laptop-6986455/",15,{"type":24,"children":25,"toc":414},"root",[26,34,44,49,72,77,84,89,117,122,128,133,138,161,166,172,177,182,200,205,211,216,234,239,257,262,268,273,291,296,302,307,330,335,340,368,373,378,383],{"type":27,"tag":28,"props":29,"children":30},"element","p",{},[31],{"type":32,"value":33},"text","很多团队在 Nuxt 里做 SEO，最开始都只关注一件事：",{"type":27,"tag":35,"props":36,"children":37},"ul",{},[38],{"type":27,"tag":39,"props":40,"children":41},"li",{},[42],{"type":32,"value":43},"title 和 description 有没有设置",{"type":27,"tag":28,"props":45,"children":46},{},[47],{"type":32,"value":48},"这当然重要，但真正进入内容站、电商站或多语言站之后，SEO 很快就不是一两个 meta 标签能解决的问题。团队会陆续遇到：",{"type":27,"tag":35,"props":50,"children":51},{},[52,57,62,67],{"type":27,"tag":39,"props":53,"children":54},{},[55],{"type":32,"value":56},"sitemap 怎么自动生成",{"type":27,"tag":39,"props":58,"children":59},{},[60],{"type":32,"value":61},"robots 和 canonical 怎么统一控制",{"type":27,"tag":39,"props":63,"children":64},{},[65],{"type":32,"value":66},"schema.org 结构化数据怎么维护",{"type":27,"tag":39,"props":68,"children":69},{},[70],{"type":32,"value":71},"图片、内容页、分页页是否都被正确索引",{"type":27,"tag":28,"props":73,"children":74},{},[75],{"type":32,"value":76},"这时 Nuxt SEO 的重点就从“单页面头信息”变成“模块化能力组合”。",{"type":27,"tag":78,"props":79,"children":81},"h2",{"id":80},"先分清-nuxt-seo-的几类职责",[82],{"type":32,"value":83},"先分清 Nuxt SEO 的几类职责",{"type":27,"tag":28,"props":85,"children":86},{},[87],{"type":32,"value":88},"Nuxt SEO 相关能力，大致可以拆成五类：",{"type":27,"tag":35,"props":90,"children":91},{},[92,97,102,107,112],{"type":27,"tag":39,"props":93,"children":94},{},[95],{"type":32,"value":96},"元信息：title、description、OG、Twitter Card",{"type":27,"tag":39,"props":98,"children":99},{},[100],{"type":32,"value":101},"索引控制：robots、canonical、noindex、分页策略",{"type":27,"tag":39,"props":103,"children":104},{},[105],{"type":32,"value":106},"站点发现：sitemap、rss、hreflang",{"type":27,"tag":39,"props":108,"children":109},{},[110],{"type":32,"value":111},"结构化数据：schema.org、FAQ、Article、Breadcrumb",{"type":27,"tag":39,"props":113,"children":114},{},[115],{"type":32,"value":116},"媒体与性能：图片尺寸、预渲染、内容可抓取性",{"type":27,"tag":28,"props":118,"children":119},{},[120],{"type":32,"value":121},"如果这些职责全堆在页面组件里，维护成本会很快失控。",{"type":27,"tag":78,"props":123,"children":125},{"id":124},"usehead-是基础不是完整-seo-方案",[126],{"type":32,"value":127},"useHead 是基础，不是完整 SEO 方案",{"type":27,"tag":28,"props":129,"children":130},{},[131],{"type":32,"value":132},"Nuxt 自带的 useHead 和 useSeoMeta 足够处理页面级元信息，但它们解决的是“声明”，不是“治理”。",{"type":27,"tag":28,"props":134,"children":135},{},[136],{"type":32,"value":137},"项目一大，就会出现这些问题：",{"type":27,"tag":35,"props":139,"children":140},{},[141,146,151,156],{"type":27,"tag":39,"props":142,"children":143},{},[144],{"type":32,"value":145},"不同页面写法不一致",{"type":27,"tag":39,"props":147,"children":148},{},[149],{"type":32,"value":150},"canonical 重复或缺失",{"type":27,"tag":39,"props":152,"children":153},{},[154],{"type":32,"value":155},"列表页、标签页、搜索页规则混乱",{"type":27,"tag":39,"props":157,"children":158},{},[159],{"type":32,"value":160},"内容更新后 sitemap 不同步",{"type":27,"tag":28,"props":162,"children":163},{},[164],{"type":32,"value":165},"所以 useHead 适合做局部页面配置，而站点级 SEO 规则最好由模块和统一策略承接。",{"type":27,"tag":78,"props":167,"children":169},{"id":168},"sitemap-与路由策略要一起设计",[170],{"type":32,"value":171},"Sitemap 与路由策略要一起设计",{"type":27,"tag":28,"props":173,"children":174},{},[175],{"type":32,"value":176},"很多站点不是没有 sitemap，而是 sitemap 生成得不准确。",{"type":27,"tag":28,"props":178,"children":179},{},[180],{"type":32,"value":181},"常见问题包括：",{"type":27,"tag":35,"props":183,"children":184},{},[185,190,195],{"type":27,"tag":39,"props":186,"children":187},{},[188],{"type":32,"value":189},"把不该收录的搜索结果页也放进去",{"type":27,"tag":39,"props":191,"children":192},{},[193],{"type":32,"value":194},"动态内容更新后 sitemap 没刷新",{"type":27,"tag":39,"props":196,"children":197},{},[198],{"type":32,"value":199},"多语言页面没有正确输出 alternates",{"type":27,"tag":28,"props":201,"children":202},{},[203],{"type":32,"value":204},"Nuxt 的 sitemap 模块价值就在这里：它可以把内容来源、路由规则和索引策略统一到一个地方，而不是散落在各个页面中手工维护。",{"type":27,"tag":78,"props":206,"children":208},{"id":207},"schema-结构化数据更适合模块化封装",[209],{"type":32,"value":210},"Schema 结构化数据更适合模块化封装",{"type":27,"tag":28,"props":212,"children":213},{},[214],{"type":32,"value":215},"FAQ、Article、Breadcrumb、Product 这类 schema 如果每篇文章手写，很快就会出现：",{"type":27,"tag":35,"props":217,"children":218},{},[219,224,229],{"type":27,"tag":39,"props":220,"children":221},{},[222],{"type":32,"value":223},"字段命名不统一",{"type":27,"tag":39,"props":225,"children":226},{},[227],{"type":32,"value":228},"页面类型切换时容易漏改",{"type":27,"tag":39,"props":230,"children":231},{},[232],{"type":32,"value":233},"多人协作下质量不稳定",{"type":27,"tag":28,"props":235,"children":236},{},[237],{"type":32,"value":238},"更好的方式是：",{"type":27,"tag":35,"props":240,"children":241},{},[242,247,252],{"type":27,"tag":39,"props":243,"children":244},{},[245],{"type":32,"value":246},"文章型页面统一走 article schema 组合",{"type":27,"tag":39,"props":248,"children":249},{},[250],{"type":32,"value":251},"分类页统一走 breadcrumb 与 collection 规则",{"type":27,"tag":39,"props":253,"children":254},{},[255],{"type":32,"value":256},"特定模板由 composable 或 module 统一输出",{"type":27,"tag":28,"props":258,"children":259},{},[260],{"type":32,"value":261},"这样既能保证结构一致，也更便于全站升级。",{"type":27,"tag":78,"props":263,"children":265},{"id":264},"图片和内容模块也是-seo-系统的一部分",[266],{"type":32,"value":267},"图片和内容模块也是 SEO 系统的一部分",{"type":27,"tag":28,"props":269,"children":270},{},[271],{"type":32,"value":272},"不少团队把 Nuxt Image、内容路由和 SEO 分开看，但对搜索引擎来说，它们其实是一套系统：",{"type":27,"tag":35,"props":274,"children":275},{},[276,281,286],{"type":27,"tag":39,"props":277,"children":278},{},[279],{"type":32,"value":280},"图片尺寸和格式影响 LCP",{"type":27,"tag":39,"props":282,"children":283},{},[284],{"type":32,"value":285},"图片 alt 和 URL 结构影响语义与抓取",{"type":27,"tag":39,"props":287,"children":288},{},[289],{"type":32,"value":290},"内容模块和路由结构影响主题聚合与内链",{"type":27,"tag":28,"props":292,"children":293},{},[294],{"type":32,"value":295},"也就是说，Nuxt SEO 不只是 head 配置，还包括内容组织和媒体交付。",{"type":27,"tag":78,"props":297,"children":299},{"id":298},"一个常见失败案例页面-meta-都有但全站索引质量仍然一般",[300],{"type":32,"value":301},"一个常见失败案例：页面 meta 都有，但全站索引质量仍然一般",{"type":27,"tag":28,"props":303,"children":304},{},[305],{"type":32,"value":306},"这类站点往往做到了页面层面的基础 SEO，却缺少系统治理：",{"type":27,"tag":35,"props":308,"children":309},{},[310,315,320,325],{"type":27,"tag":39,"props":311,"children":312},{},[313],{"type":32,"value":314},"sitemap 不完整",{"type":27,"tag":39,"props":316,"children":317},{},[318],{"type":32,"value":319},"canonical 策略不统一",{"type":27,"tag":39,"props":321,"children":322},{},[323],{"type":32,"value":324},"分类页与文章页内链断裂",{"type":27,"tag":39,"props":326,"children":327},{},[328],{"type":32,"value":329},"schema 数据结构不稳定",{"type":27,"tag":28,"props":331,"children":332},{},[333],{"type":32,"value":334},"结果是单页看起来“配置都没问题”，但整站搜索表现仍然不够理想。",{"type":27,"tag":78,"props":336,"children":338},{"id":337},"一份可直接复用的检查清单",[339],{"type":32,"value":337},{"type":27,"tag":35,"props":341,"children":342},{},[343,348,353,358,363],{"type":27,"tag":39,"props":344,"children":345},{},[346],{"type":32,"value":347},"是否把元信息、索引控制、站点发现、结构化数据和媒体交付分层设计",{"type":27,"tag":39,"props":349,"children":350},{},[351],{"type":32,"value":352},"useHead 是否只承担页面声明，而不是整站 SEO 治理",{"type":27,"tag":39,"props":354,"children":355},{},[356],{"type":32,"value":357},"sitemap 是否与真实路由和索引策略保持一致",{"type":27,"tag":39,"props":359,"children":360},{},[361],{"type":32,"value":362},"schema 是否被封装成可复用规则而不是手写散落",{"type":27,"tag":39,"props":364,"children":365},{},[366],{"type":32,"value":367},"图片与内容路由是否纳入 SEO 系统设计",{"type":27,"tag":78,"props":369,"children":371},{"id":370},"总结",[372],{"type":32,"value":370},{"type":27,"tag":28,"props":374,"children":375},{},[376],{"type":32,"value":377},"Nuxt SEO 模块真正的价值，不是帮你少写几行 meta，而是把整站 SEO 能力做成可维护的系统组合。只要先把 sitemap、schema、索引规则和内容结构统一起来，SEO 才会从页面技巧升级为站点能力。",{"type":27,"tag":28,"props":379,"children":380},{},[381],{"type":32,"value":382},"进一步阅读：",{"type":27,"tag":35,"props":384,"children":385},{},[386,396,405],{"type":27,"tag":39,"props":387,"children":388},{},[389],{"type":27,"tag":390,"props":391,"children":393},"a",{"href":392},"/topics/nuxt/nuxt-seo-best-practices",[394],{"type":32,"value":395},"Nuxt 3 SEO 优化最佳实践指南",{"type":27,"tag":39,"props":397,"children":398},{},[399],{"type":27,"tag":390,"props":400,"children":402},{"href":401},"/topics/seo/multilingual-website-seo-architecture",[403],{"type":32,"value":404},"多语言网站 SEO 架构设计",{"type":27,"tag":39,"props":406,"children":407},{},[408],{"type":27,"tag":390,"props":409,"children":411},{"href":410},"/topics/seo/structured-data-advanced-applications-guide",[412],{"type":32,"value":413},"结构化数据高级应用",{"title":7,"searchDepth":415,"depth":415,"links":416},3,[417,419,420,421,422,423,424,425],{"id":80,"depth":418,"text":83},2,{"id":124,"depth":418,"text":127},{"id":168,"depth":418,"text":171},{"id":207,"depth":418,"text":210},{"id":264,"depth":418,"text":267},{"id":298,"depth":418,"text":301},{"id":337,"depth":418,"text":337},{"id":370,"depth":418,"text":370},"markdown","content:topics:nuxt:nuxt-seo-module-ecosystem-guide.md","content","topics/nuxt/nuxt-seo-module-ecosystem-guide.md","topics/nuxt/nuxt-seo-module-ecosystem-guide","md",[433,1421,2204],{"_path":434,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":435,"description":436,"date":437,"topic":5,"author":11,"tags":438,"image":444,"featured":445,"readingTime":446,"body":447,"_type":426,"_id":1418,"_source":428,"_file":1419,"_stem":1420,"_extension":431},"/topics/nuxt/nitro-engine-deep-dive","Nitro 引擎深度剖析","讲透 Nuxt/Nitro 的运行时模型、路由与中间件、存储层与缓存、部署适配与性能调优，帮助你把服务端能力当成可控的工程系统。","2026-01-20",[13,439,440,441,442,443],"Nitro","SSR","Serverless","Edge","缓存","/images/topics/nuxt/nitro.jpg",true,21,{"type":24,"children":448,"toc":1386},[449,454,467,472,531,536,541,545,551,556,580,585,603,606,612,617,640,645,648,670,682,700,711,724,730,753,756,762,767,798,803,816,819,825,837,850,855,873,878,891,894,900,905,923,929,948,954,959,964,993,996,1002,1007,1025,1030,1048,1054,1067,1073,1086,1092,1105,1110,1123,1126,1132,1138,1151,1157,1170,1176,1189,1192,1198,1203,1226,1231,1244,1247,1253,1258,1316,1321,1339,1342,1346,1358,1363],{"type":27,"tag":78,"props":450,"children":452},{"id":451},"nitro-引擎深度剖析",[453],{"type":32,"value":435},{"type":27,"tag":28,"props":455,"children":456},{},[457,459,465],{"type":32,"value":458},"在 Nuxt 3/4 的体系里，Nitro 不是“一个服务器”，而是一套",{"type":27,"tag":460,"props":461,"children":462},"strong",{},[463],{"type":32,"value":464},"可移植的服务端运行时与构建产物规范",{"type":32,"value":466},"。",{"type":27,"tag":28,"props":468,"children":469},{},[470],{"type":32,"value":471},"它把你在开发时写的：",{"type":27,"tag":35,"props":473,"children":474},{},[475,487,498,509,520],{"type":27,"tag":39,"props":476,"children":477},{},[478,485],{"type":27,"tag":479,"props":480,"children":482},"code",{"className":481},[],[483],{"type":32,"value":484},"server/api/*",{"type":32,"value":486},"（API 路由）",{"type":27,"tag":39,"props":488,"children":489},{},[490,496],{"type":27,"tag":479,"props":491,"children":493},{"className":492},[],[494],{"type":32,"value":495},"server/routes/*",{"type":32,"value":497},"（更底层路由）",{"type":27,"tag":39,"props":499,"children":500},{},[501,507],{"type":27,"tag":479,"props":502,"children":504},{"className":503},[],[505],{"type":32,"value":506},"server/middleware/*",{"type":32,"value":508},"（中间件）",{"type":27,"tag":39,"props":510,"children":511},{},[512,518],{"type":27,"tag":479,"props":513,"children":515},{"className":514},[],[516],{"type":32,"value":517},"server/plugins/*",{"type":32,"value":519},"（启动插件）",{"type":27,"tag":39,"props":521,"children":522},{},[523,529],{"type":27,"tag":479,"props":524,"children":526},{"className":525},[],[527],{"type":32,"value":528},"storage",{"type":32,"value":530},"（KV/文件/内存等存储抽象）",{"type":27,"tag":28,"props":532,"children":533},{},[534],{"type":32,"value":535},"统一编译成一个可以部署到多种环境的产物：Node Server、Serverless、Edge（取决于适配器与能力集）。",{"type":27,"tag":28,"props":537,"children":538},{},[539],{"type":32,"value":540},"这篇文章按“你要在生产上稳定运行”的视角，拆解 Nitro 的关键构件，并给出性能与可观测性落地建议。",{"type":27,"tag":542,"props":543,"children":544},"hr",{},[],{"type":27,"tag":78,"props":546,"children":548},{"id":547},"_1-nitro-的定位从-nuxt-ssr-到通用服务端运行时",[549],{"type":32,"value":550},"1. Nitro 的定位：从 Nuxt SSR 到“通用服务端运行时”",{"type":27,"tag":28,"props":552,"children":553},{},[554],{"type":32,"value":555},"Nitro 解决两类问题：",{"type":27,"tag":557,"props":558,"children":559},"ol",{},[560,570],{"type":27,"tag":39,"props":561,"children":562},{},[563,568],{"type":27,"tag":460,"props":564,"children":565},{},[566],{"type":32,"value":567},"运行时统一",{"type":32,"value":569},"：开发/生产环境一致的请求处理模型",{"type":27,"tag":39,"props":571,"children":572},{},[573,578],{"type":27,"tag":460,"props":574,"children":575},{},[576],{"type":32,"value":577},"部署可移植",{"type":32,"value":579},"：同一套代码可输出到不同部署目标",{"type":27,"tag":28,"props":581,"children":582},{},[583],{"type":32,"value":584},"你可以把 Nitro 看作 Nuxt 的“服务端内核”，而 Nuxt 只是围绕它提供：",{"type":27,"tag":35,"props":586,"children":587},{},[588,593,598],{"type":27,"tag":39,"props":589,"children":590},{},[591],{"type":32,"value":592},"视图渲染（SSR/RSC 相关能力）",{"type":27,"tag":39,"props":594,"children":595},{},[596],{"type":32,"value":597},"资源构建（Vite/Webpack）",{"type":27,"tag":39,"props":599,"children":600},{},[601],{"type":32,"value":602},"路由与数据获取的上层抽象",{"type":27,"tag":542,"props":604,"children":605},{},[],{"type":27,"tag":78,"props":607,"children":609},{"id":608},"_2-请求生命周期一次请求在-nitro-里怎么走",[610],{"type":32,"value":611},"2. 请求生命周期：一次请求在 Nitro 里怎么走？",{"type":27,"tag":28,"props":613,"children":614},{},[615],{"type":32,"value":616},"简化后的请求链路：",{"type":27,"tag":557,"props":618,"children":619},{},[620,625,630,635],{"type":27,"tag":39,"props":621,"children":622},{},[623],{"type":32,"value":624},"入口适配器接收请求（Node/Serverless/Edge）",{"type":27,"tag":39,"props":626,"children":627},{},[628],{"type":32,"value":629},"进入 Nitro 的 H3 请求处理器（统一事件模型）",{"type":27,"tag":39,"props":631,"children":632},{},[633],{"type":32,"value":634},"依次执行：中间件 → 路由匹配 → handler",{"type":27,"tag":39,"props":636,"children":637},{},[638],{"type":32,"value":639},"写回响应（含 headers、缓存策略、流式输出等）",{"type":27,"tag":28,"props":641,"children":642},{},[643],{"type":32,"value":644},"关键点：Nitro 用统一的事件对象承载请求上下文，这让你在不同部署目标下写出的 server 代码保持一致。",{"type":27,"tag":542,"props":646,"children":647},{},[],{"type":27,"tag":78,"props":649,"children":651},{"id":650},"_3-路由系统serverapi-与-serverroutes-的区别",[652,654,660,662,668],{"type":32,"value":653},"3. 路由系统：",{"type":27,"tag":479,"props":655,"children":657},{"className":656},[],[658],{"type":32,"value":659},"server/api",{"type":32,"value":661}," 与 ",{"type":27,"tag":479,"props":663,"children":665},{"className":664},[],[666],{"type":32,"value":667},"server/routes",{"type":32,"value":669}," 的区别",{"type":27,"tag":671,"props":672,"children":674},"h3",{"id":673},"_31-serverapi",[675,677],{"type":32,"value":676},"3.1 ",{"type":27,"tag":479,"props":678,"children":680},{"className":679},[],[681],{"type":32,"value":484},{"type":27,"tag":35,"props":683,"children":684},{},[685,690,695],{"type":27,"tag":39,"props":686,"children":687},{},[688],{"type":32,"value":689},"面向 API 的约定式目录",{"type":27,"tag":39,"props":691,"children":692},{},[693],{"type":32,"value":694},"通常返回 JSON",{"type":27,"tag":39,"props":696,"children":697},{},[698],{"type":32,"value":699},"与 Nuxt 的开发体验高度整合",{"type":27,"tag":671,"props":701,"children":703},{"id":702},"_32-serverroutes",[704,706],{"type":32,"value":705},"3.2 ",{"type":27,"tag":479,"props":707,"children":709},{"className":708},[],[710],{"type":32,"value":495},{"type":27,"tag":35,"props":712,"children":713},{},[714,719],{"type":27,"tag":39,"props":715,"children":716},{},[717],{"type":32,"value":718},"更底层，更贴近“HTTP 路由”",{"type":27,"tag":39,"props":720,"children":721},{},[722],{"type":32,"value":723},"更适合做：Webhook、回调、代理、特殊 content-type",{"type":27,"tag":671,"props":725,"children":727},{"id":726},"_33-实践建议",[728],{"type":32,"value":729},"3.3 实践建议",{"type":27,"tag":35,"props":731,"children":732},{},[733,743],{"type":27,"tag":39,"props":734,"children":735},{},[736,738],{"type":32,"value":737},"普通业务 API：优先 ",{"type":27,"tag":479,"props":739,"children":741},{"className":740},[],[742],{"type":32,"value":659},{"type":27,"tag":39,"props":744,"children":745},{},[746,748],{"type":32,"value":747},"需要更强控制（stream、代理、非 JSON）：用 ",{"type":27,"tag":479,"props":749,"children":751},{"className":750},[],[752],{"type":32,"value":667},{"type":27,"tag":542,"props":754,"children":755},{},[],{"type":27,"tag":78,"props":757,"children":759},{"id":758},"_4-中间件全局逻辑的正确放置",[760],{"type":32,"value":761},"4. 中间件：全局逻辑的正确放置",{"type":27,"tag":28,"props":763,"children":764},{},[765],{"type":32,"value":766},"Nitro 中的中间件通常用于：",{"type":27,"tag":35,"props":768,"children":769},{},[770,775,788,793],{"type":27,"tag":39,"props":771,"children":772},{},[773],{"type":32,"value":774},"鉴权/鉴别请求来源",{"type":27,"tag":39,"props":776,"children":777},{},[778,780,786],{"type":32,"value":779},"注入 ",{"type":27,"tag":479,"props":781,"children":783},{"className":782},[],[784],{"type":32,"value":785},"requestId",{"type":32,"value":787},"、trace 信息",{"type":27,"tag":39,"props":789,"children":790},{},[791],{"type":32,"value":792},"统一错误处理与日志",{"type":27,"tag":39,"props":794,"children":795},{},[796],{"type":32,"value":797},"基础安全 headers",{"type":27,"tag":28,"props":799,"children":800},{},[801],{"type":32,"value":802},"一个推荐的中间件职责边界：",{"type":27,"tag":35,"props":804,"children":805},{},[806,811],{"type":27,"tag":39,"props":807,"children":808},{},[809],{"type":32,"value":810},"中间件只做“横切关注点”",{"type":27,"tag":39,"props":812,"children":813},{},[814],{"type":32,"value":815},"不做具体业务（避免耦合与隐式依赖）",{"type":27,"tag":542,"props":817,"children":818},{},[],{"type":27,"tag":78,"props":820,"children":822},{"id":821},"_5-storage-抽象让缓存与数据存取可替换",[823],{"type":32,"value":824},"5. Storage 抽象：让缓存与数据存取可替换",{"type":27,"tag":28,"props":826,"children":827},{},[828,830,835],{"type":32,"value":829},"Nitro 的一个被低估的能力是 ",{"type":27,"tag":479,"props":831,"children":833},{"className":832},[],[834],{"type":32,"value":528},{"type":32,"value":836},"：",{"type":27,"tag":35,"props":838,"children":839},{},[840,845],{"type":27,"tag":39,"props":841,"children":842},{},[843],{"type":32,"value":844},"提供 KV 风格 API",{"type":27,"tag":39,"props":846,"children":847},{},[848],{"type":32,"value":849},"可接入内存、文件、Redis 等（取决于配置与环境）",{"type":27,"tag":28,"props":851,"children":852},{},[853],{"type":32,"value":854},"你可以用它做：",{"type":27,"tag":35,"props":856,"children":857},{},[858,863,868],{"type":27,"tag":39,"props":859,"children":860},{},[861],{"type":32,"value":862},"缓存（页面片段、API 结果）",{"type":27,"tag":39,"props":864,"children":865},{},[866],{"type":32,"value":867},"限流计数器",{"type":27,"tag":39,"props":869,"children":870},{},[871],{"type":32,"value":872},"临时会话信息",{"type":27,"tag":28,"props":874,"children":875},{},[876],{"type":32,"value":877},"设计原则：",{"type":27,"tag":35,"props":879,"children":880},{},[881,886],{"type":27,"tag":39,"props":882,"children":883},{},[884],{"type":32,"value":885},"把 storage 当成“可失效缓存”，不要当主数据库",{"type":27,"tag":39,"props":887,"children":888},{},[889],{"type":32,"value":890},"明确 TTL 与清理策略",{"type":27,"tag":542,"props":892,"children":893},{},[],{"type":27,"tag":78,"props":895,"children":897},{"id":896},"_6-缓存策略把快变成可控的工程能力",[898],{"type":32,"value":899},"6. 缓存策略：把“快”变成可控的工程能力",{"type":27,"tag":28,"props":901,"children":902},{},[903],{"type":32,"value":904},"Nitro 里的缓存往往涉及三层：",{"type":27,"tag":557,"props":906,"children":907},{},[908,913,918],{"type":27,"tag":39,"props":909,"children":910},{},[911],{"type":32,"value":912},"CDN 缓存（边缘）",{"type":27,"tag":39,"props":914,"children":915},{},[916],{"type":32,"value":917},"Nitro 运行时缓存（storage）",{"type":27,"tag":39,"props":919,"children":920},{},[921],{"type":32,"value":922},"上游服务缓存（数据库/服务端）",{"type":27,"tag":671,"props":924,"children":926},{"id":925},"_61-api-缓存的推荐做法",[927],{"type":32,"value":928},"6.1 API 缓存的推荐做法",{"type":27,"tag":35,"props":930,"children":931},{},[932,943],{"type":27,"tag":39,"props":933,"children":934},{},[935,937],{"type":32,"value":936},"对“读多写少”的接口做 ",{"type":27,"tag":479,"props":938,"children":940},{"className":939},[],[941],{"type":32,"value":942},"stale-while-revalidate",{"type":27,"tag":39,"props":944,"children":945},{},[946],{"type":32,"value":947},"缓存 key 必须包含：用户态/语言/地区/权限等关键维度",{"type":27,"tag":671,"props":949,"children":951},{"id":950},"_62-不要缓存带用户身份的响应除非你非常确定",[952],{"type":32,"value":953},"6.2 不要缓存“带用户身份”的响应（除非你非常确定）",{"type":27,"tag":28,"props":955,"children":956},{},[957],{"type":32,"value":958},"最容易出事故的是把 A 用户的数据缓存给 B 用户。",{"type":27,"tag":28,"props":960,"children":961},{},[962],{"type":32,"value":963},"建议：",{"type":27,"tag":35,"props":965,"children":966},{},[967,972],{"type":27,"tag":39,"props":968,"children":969},{},[970],{"type":32,"value":971},"默认对用户态接口不缓存",{"type":27,"tag":39,"props":973,"children":974},{},[975,977,983,985,991],{"type":32,"value":976},"必须缓存时，key 中加入 ",{"type":27,"tag":479,"props":978,"children":980},{"className":979},[],[981],{"type":32,"value":982},"userId",{"type":32,"value":984}," 或 ",{"type":27,"tag":479,"props":986,"children":988},{"className":987},[],[989],{"type":32,"value":990},"session",{"type":32,"value":992}," 维度",{"type":27,"tag":542,"props":994,"children":995},{},[],{"type":27,"tag":78,"props":997,"children":999},{"id":998},"_7-部署适配为什么同一套代码能跑在不同环境",[1000],{"type":32,"value":1001},"7. 部署适配：为什么同一套代码能跑在不同环境？",{"type":27,"tag":28,"props":1003,"children":1004},{},[1005],{"type":32,"value":1006},"Nitro 的部署产物通常包含：",{"type":27,"tag":35,"props":1008,"children":1009},{},[1010,1015,1020],{"type":27,"tag":39,"props":1011,"children":1012},{},[1013],{"type":32,"value":1014},"编译后的 server bundle",{"type":27,"tag":39,"props":1016,"children":1017},{},[1018],{"type":32,"value":1019},"路由清单与运行时配置",{"type":27,"tag":39,"props":1021,"children":1022},{},[1023],{"type":32,"value":1024},"静态资源与预渲染结果（如果启用）",{"type":27,"tag":28,"props":1026,"children":1027},{},[1028],{"type":32,"value":1029},"在不同目标下的差异主要在：",{"type":27,"tag":35,"props":1031,"children":1032},{},[1033,1038,1043],{"type":27,"tag":39,"props":1034,"children":1035},{},[1036],{"type":32,"value":1037},"运行时能力（Node API 是否可用）",{"type":27,"tag":39,"props":1039,"children":1040},{},[1041],{"type":32,"value":1042},"冷启动与并发模型",{"type":27,"tag":39,"props":1044,"children":1045},{},[1046],{"type":32,"value":1047},"文件系统是否可写",{"type":27,"tag":671,"props":1049,"children":1051},{"id":1050},"_71-node-server",[1052],{"type":32,"value":1053},"7.1 Node Server",{"type":27,"tag":35,"props":1055,"children":1056},{},[1057,1062],{"type":27,"tag":39,"props":1058,"children":1059},{},[1060],{"type":32,"value":1061},"能力最完整",{"type":27,"tag":39,"props":1063,"children":1064},{},[1065],{"type":32,"value":1066},"适合长连接、websocket（需配合平台）",{"type":27,"tag":671,"props":1068,"children":1070},{"id":1069},"_72-serverless",[1071],{"type":32,"value":1072},"7.2 Serverless",{"type":27,"tag":35,"props":1074,"children":1075},{},[1076,1081],{"type":27,"tag":39,"props":1077,"children":1078},{},[1079],{"type":32,"value":1080},"冷启动成本、执行时长限制",{"type":27,"tag":39,"props":1082,"children":1083},{},[1084],{"type":32,"value":1085},"更适合 API 型工作负载",{"type":27,"tag":671,"props":1087,"children":1089},{"id":1088},"_73-edge",[1090],{"type":32,"value":1091},"7.3 Edge",{"type":27,"tag":35,"props":1093,"children":1094},{},[1095,1100],{"type":27,"tag":39,"props":1096,"children":1097},{},[1098],{"type":32,"value":1099},"延迟更低",{"type":27,"tag":39,"props":1101,"children":1102},{},[1103],{"type":32,"value":1104},"运行时限制更严格（例如 Node API 不可用）",{"type":27,"tag":28,"props":1106,"children":1107},{},[1108],{"type":32,"value":1109},"实践建议：",{"type":27,"tag":35,"props":1111,"children":1112},{},[1113,1118],{"type":27,"tag":39,"props":1114,"children":1115},{},[1116],{"type":32,"value":1117},"如果你依赖复杂 Node 能力（例如图像处理、原生模块），优先 Node/Serverless",{"type":27,"tag":39,"props":1119,"children":1120},{},[1121],{"type":32,"value":1122},"如果你追求极致延迟且逻辑简单，考虑 Edge",{"type":27,"tag":542,"props":1124,"children":1125},{},[],{"type":27,"tag":78,"props":1127,"children":1129},{"id":1128},"_8-性能调优nitro-侧你能做什么",[1130],{"type":32,"value":1131},"8. 性能调优：Nitro 侧你能做什么？",{"type":27,"tag":671,"props":1133,"children":1135},{"id":1134},"_81-减少阻塞-io",[1136],{"type":32,"value":1137},"8.1 减少阻塞 I/O",{"type":27,"tag":35,"props":1139,"children":1140},{},[1141,1146],{"type":27,"tag":39,"props":1142,"children":1143},{},[1144],{"type":32,"value":1145},"避免请求内做同步文件读写",{"type":27,"tag":39,"props":1147,"children":1148},{},[1149],{"type":32,"value":1150},"对“配置/规则”等可缓存数据做启动预热",{"type":27,"tag":671,"props":1152,"children":1154},{"id":1153},"_82-控制上游依赖",[1155],{"type":32,"value":1156},"8.2 控制上游依赖",{"type":27,"tag":35,"props":1158,"children":1159},{},[1160,1165],{"type":27,"tag":39,"props":1161,"children":1162},{},[1163],{"type":32,"value":1164},"给外部请求设超时（例如 2~3s）",{"type":27,"tag":39,"props":1166,"children":1167},{},[1168],{"type":32,"value":1169},"加重试要谨慎（避免雪崩）",{"type":27,"tag":671,"props":1171,"children":1173},{"id":1172},"_83-响应体积与压缩",[1174],{"type":32,"value":1175},"8.3 响应体积与压缩",{"type":27,"tag":35,"props":1177,"children":1178},{},[1179,1184],{"type":27,"tag":39,"props":1180,"children":1181},{},[1182],{"type":32,"value":1183},"JSON 输出控制字段",{"type":27,"tag":39,"props":1185,"children":1186},{},[1187],{"type":32,"value":1188},"开启 gzip/br",{"type":27,"tag":542,"props":1190,"children":1191},{},[],{"type":27,"tag":78,"props":1193,"children":1195},{"id":1194},"_9-可观测性没有观测就没有稳定",[1196],{"type":32,"value":1197},"9. 可观测性：没有观测就没有“稳定”",{"type":27,"tag":28,"props":1199,"children":1200},{},[1201],{"type":32,"value":1202},"建议 Nitro 侧最小可观测集合：",{"type":27,"tag":35,"props":1204,"children":1205},{},[1206,1211,1216,1221],{"type":27,"tag":39,"props":1207,"children":1208},{},[1209],{"type":32,"value":1210},"requestId/traceId",{"type":27,"tag":39,"props":1212,"children":1213},{},[1214],{"type":32,"value":1215},"关键路由耗时（p50/p95）",{"type":27,"tag":39,"props":1217,"children":1218},{},[1219],{"type":32,"value":1220},"错误率（按路由/按状态码）",{"type":27,"tag":39,"props":1222,"children":1223},{},[1224],{"type":32,"value":1225},"上游依赖耗时（DB/HTTP）",{"type":27,"tag":28,"props":1227,"children":1228},{},[1229],{"type":32,"value":1230},"落地方式：",{"type":27,"tag":35,"props":1232,"children":1233},{},[1234,1239],{"type":27,"tag":39,"props":1235,"children":1236},{},[1237],{"type":32,"value":1238},"在中间件注入 requestId",{"type":27,"tag":39,"props":1240,"children":1241},{},[1242],{"type":32,"value":1243},"在统一错误处理处记录结构化日志",{"type":27,"tag":542,"props":1245,"children":1246},{},[],{"type":27,"tag":78,"props":1248,"children":1250},{"id":1249},"_10-一个推荐的-nitro-工程结构",[1251],{"type":32,"value":1252},"10. 一个推荐的 Nitro 工程结构",{"type":27,"tag":28,"props":1254,"children":1255},{},[1256],{"type":32,"value":1257},"在 Nuxt 项目里，你可以这样组织服务端代码：",{"type":27,"tag":35,"props":1259,"children":1260},{},[1261,1272,1283,1294,1305],{"type":27,"tag":39,"props":1262,"children":1263},{},[1264,1270],{"type":27,"tag":479,"props":1265,"children":1267},{"className":1266},[],[1268],{"type":32,"value":1269},"server/middleware/",{"type":32,"value":1271},"：鉴权、日志、headers、rate limit",{"type":27,"tag":39,"props":1273,"children":1274},{},[1275,1281],{"type":27,"tag":479,"props":1276,"children":1278},{"className":1277},[],[1279],{"type":32,"value":1280},"server/api/",{"type":32,"value":1282},"：业务 API（薄控制器）",{"type":27,"tag":39,"props":1284,"children":1285},{},[1286,1292],{"type":27,"tag":479,"props":1287,"children":1289},{"className":1288},[],[1290],{"type":32,"value":1291},"server/services/",{"type":32,"value":1293},"：领域服务（可复用）",{"type":27,"tag":39,"props":1295,"children":1296},{},[1297,1303],{"type":27,"tag":479,"props":1298,"children":1300},{"className":1299},[],[1301],{"type":32,"value":1302},"server/repositories/",{"type":32,"value":1304},"：数据访问层",{"type":27,"tag":39,"props":1306,"children":1307},{},[1308,1314],{"type":27,"tag":479,"props":1309,"children":1311},{"className":1310},[],[1312],{"type":32,"value":1313},"server/utils/",{"type":32,"value":1315},"：纯工具",{"type":27,"tag":28,"props":1317,"children":1318},{},[1319],{"type":32,"value":1320},"目标是：",{"type":27,"tag":35,"props":1322,"children":1323},{},[1324,1329,1334],{"type":27,"tag":39,"props":1325,"children":1326},{},[1327],{"type":32,"value":1328},"handler 只做协议适配",{"type":27,"tag":39,"props":1330,"children":1331},{},[1332],{"type":32,"value":1333},"业务逻辑可复用、可测试",{"type":27,"tag":39,"props":1335,"children":1336},{},[1337],{"type":32,"value":1338},"横切能力集中化",{"type":27,"tag":542,"props":1340,"children":1341},{},[],{"type":27,"tag":78,"props":1343,"children":1344},{"id":370},[1345],{"type":32,"value":370},{"type":27,"tag":28,"props":1347,"children":1348},{},[1349,1351,1356],{"type":32,"value":1350},"Nitro 的本质是：把 Nuxt 的服务端能力变成一个",{"type":27,"tag":460,"props":1352,"children":1353},{},[1354],{"type":32,"value":1355},"可编译、可移植、可观测",{"type":32,"value":1357},"的运行时系统。",{"type":27,"tag":28,"props":1359,"children":1360},{},[1361],{"type":32,"value":1362},"你一旦理解了它的生命周期与边界，就可以更有信心地在 Nuxt 里做：",{"type":27,"tag":35,"props":1364,"children":1365},{},[1366,1371,1376,1381],{"type":27,"tag":39,"props":1367,"children":1368},{},[1369],{"type":32,"value":1370},"性能友好的 API",{"type":27,"tag":39,"props":1372,"children":1373},{},[1374],{"type":32,"value":1375},"可控的缓存",{"type":27,"tag":39,"props":1377,"children":1378},{},[1379],{"type":32,"value":1380},"稳定的鉴权与错误处理",{"type":27,"tag":39,"props":1382,"children":1383},{},[1384],{"type":32,"value":1385},"面向多环境部署的工程架构",{"title":7,"searchDepth":415,"depth":415,"links":1387},[1388,1389,1390,1391,1399,1400,1401,1405,1410,1415,1416,1417],{"id":451,"depth":418,"text":435},{"id":547,"depth":418,"text":550},{"id":608,"depth":418,"text":611},{"id":650,"depth":418,"text":1392,"children":1393},"3. 路由系统：server/api 与 server/routes 的区别",[1394,1396,1398],{"id":673,"depth":415,"text":1395},"3.1 server/api/*",{"id":702,"depth":415,"text":1397},"3.2 server/routes/*",{"id":726,"depth":415,"text":729},{"id":758,"depth":418,"text":761},{"id":821,"depth":418,"text":824},{"id":896,"depth":418,"text":899,"children":1402},[1403,1404],{"id":925,"depth":415,"text":928},{"id":950,"depth":415,"text":953},{"id":998,"depth":418,"text":1001,"children":1406},[1407,1408,1409],{"id":1050,"depth":415,"text":1053},{"id":1069,"depth":415,"text":1072},{"id":1088,"depth":415,"text":1091},{"id":1128,"depth":418,"text":1131,"children":1411},[1412,1413,1414],{"id":1134,"depth":415,"text":1137},{"id":1153,"depth":415,"text":1156},{"id":1172,"depth":415,"text":1175},{"id":1194,"depth":418,"text":1197},{"id":1249,"depth":418,"text":1252},{"id":370,"depth":418,"text":370},"content:topics:nuxt:nitro-engine-deep-dive.md","topics/nuxt/nitro-engine-deep-dive.md","topics/nuxt/nitro-engine-deep-dive",{"_path":1422,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1423,"description":1424,"date":437,"topic":5,"author":11,"tags":1425,"image":1428,"featured":445,"readingTime":1429,"body":1430,"_type":426,"_id":2201,"_source":428,"_file":2202,"_stem":2203,"_extension":431},"/topics/nuxt/nuxt-rendering-modes-guide","Nuxt 渲染模式选择指南","从 SEO、性能、成本与一致性出发，系统对比 Nuxt 的 CSR/SSR/SSG/ISR（与预渲染）等模式，给出可执行的选型矩阵与落地架构建议。",[13,440,1426,1427,14],"SSG","ISR","/images/topics/nuxt/rendering-modes.jpg",22,{"type":24,"children":1431,"toc":2184},[1432,1437,1442,1447,1475,1487,1490,1496,1501,1524,1529,1532,1538,1544,1549,1567,1572,1591,1597,1601,1614,1618,1631,1637,1641,1654,1658,1671,1677,1682,1695,1699,1712,1716,1729,1735,1739,1752,1756,1769,1772,1778,1783,1950,1953,1959,1964,1982,1987,2000,2003,2009,2014,2019,2042,2047,2065,2068,2074,2092,2095,2101,2154,2157,2161,2166],{"type":27,"tag":78,"props":1433,"children":1435},{"id":1434},"nuxt-渲染模式选择指南",[1436],{"type":32,"value":1423},{"type":27,"tag":28,"props":1438,"children":1439},{},[1440],{"type":32,"value":1441},"“到底要不要 SSR？”是 Nuxt 项目里最常见、也最容易吵起来的问题。",{"type":27,"tag":28,"props":1443,"children":1444},{},[1445],{"type":32,"value":1446},"原因是：渲染模式不是一个单点选择，它同时牵动：",{"type":27,"tag":35,"props":1448,"children":1449},{},[1450,1455,1460,1465,1470],{"type":27,"tag":39,"props":1451,"children":1452},{},[1453],{"type":32,"value":1454},"SEO（可索引内容是否直出）",{"type":27,"tag":39,"props":1456,"children":1457},{},[1458],{"type":32,"value":1459},"性能（TTFB/LCP/INP）",{"type":27,"tag":39,"props":1461,"children":1462},{},[1463],{"type":32,"value":1464},"成本（回源、算力、带宽）",{"type":27,"tag":39,"props":1466,"children":1467},{},[1468],{"type":32,"value":1469},"一致性（内容更新策略、缓存失效）",{"type":27,"tag":39,"props":1471,"children":1472},{},[1473],{"type":32,"value":1474},"工程复杂度（部署、观测、回滚）",{"type":27,"tag":28,"props":1476,"children":1477},{},[1478,1480,1485],{"type":32,"value":1479},"这篇文章给你一套",{"type":27,"tag":460,"props":1481,"children":1482},{},[1483],{"type":32,"value":1484},"可执行的选型方法",{"type":32,"value":1486},"：先定义目标，再选模式，最后给落地结构与检查清单。",{"type":27,"tag":542,"props":1488,"children":1489},{},[],{"type":27,"tag":78,"props":1491,"children":1493},{"id":1492},"_1-四个维度决定你的模式",[1494],{"type":32,"value":1495},"1. 四个维度，决定你的模式",{"type":27,"tag":28,"props":1497,"children":1498},{},[1499],{"type":32,"value":1500},"在做任何选择前，先回答四个问题：",{"type":27,"tag":557,"props":1502,"children":1503},{},[1504,1509,1514,1519],{"type":27,"tag":39,"props":1505,"children":1506},{},[1507],{"type":32,"value":1508},"页面是否需要 SEO？（搜索引擎是否必须看到正文）",{"type":27,"tag":39,"props":1510,"children":1511},{},[1512],{"type":32,"value":1513},"数据是否强一致？（用户态/支付/权限）",{"type":27,"tag":39,"props":1515,"children":1516},{},[1517],{"type":32,"value":1518},"更新频率如何？（发布频繁 vs 偶尔）",{"type":27,"tag":39,"props":1520,"children":1521},{},[1522],{"type":32,"value":1523},"流量模型是什么？（突发、平稳、长尾）",{"type":27,"tag":28,"props":1525,"children":1526},{},[1527],{"type":32,"value":1528},"这些问题比“SSR 快还是慢”更重要。",{"type":27,"tag":542,"props":1530,"children":1531},{},[],{"type":27,"tag":78,"props":1533,"children":1535},{"id":1534},"_2-主要模式概览csr-ssr-ssg-isr-预渲染",[1536],{"type":32,"value":1537},"2. 主要模式概览：CSR / SSR / SSG / ISR / 预渲染",{"type":27,"tag":671,"props":1539,"children":1541},{"id":1540},"_21-csr纯客户端渲染",[1542],{"type":32,"value":1543},"2.1 CSR（纯客户端渲染）",{"type":27,"tag":28,"props":1545,"children":1546},{},[1547],{"type":32,"value":1548},"特点：",{"type":27,"tag":35,"props":1550,"children":1551},{},[1552,1557,1562],{"type":27,"tag":39,"props":1553,"children":1554},{},[1555],{"type":32,"value":1556},"HTML 只有壳",{"type":27,"tag":39,"props":1558,"children":1559},{},[1560],{"type":32,"value":1561},"SEO 风险大（除非你不索引）",{"type":27,"tag":39,"props":1563,"children":1564},{},[1565],{"type":32,"value":1566},"首屏性能取决于 JS 与接口",{"type":27,"tag":28,"props":1568,"children":1569},{},[1570],{"type":32,"value":1571},"适用：",{"type":27,"tag":35,"props":1573,"children":1574},{},[1575,1580],{"type":27,"tag":39,"props":1576,"children":1577},{},[1578],{"type":32,"value":1579},"用户中心、后台、强交互工具",{"type":27,"tag":39,"props":1581,"children":1582},{},[1583,1585],{"type":32,"value":1584},"不需要索引或明确 ",{"type":27,"tag":479,"props":1586,"children":1588},{"className":1587},[],[1589],{"type":32,"value":1590},"noindex",{"type":27,"tag":671,"props":1592,"children":1594},{"id":1593},"_22-ssr服务端渲染",[1595],{"type":32,"value":1596},"2.2 SSR（服务端渲染）",{"type":27,"tag":28,"props":1598,"children":1599},{},[1600],{"type":32,"value":1548},{"type":27,"tag":35,"props":1602,"children":1603},{},[1604,1609],{"type":27,"tag":39,"props":1605,"children":1606},{},[1607],{"type":32,"value":1608},"首屏 HTML 直出，SEO 友好",{"type":27,"tag":39,"props":1610,"children":1611},{},[1612],{"type":32,"value":1613},"每次请求可能都需要回源（需要缓存）",{"type":27,"tag":28,"props":1615,"children":1616},{},[1617],{"type":32,"value":1571},{"type":27,"tag":35,"props":1619,"children":1620},{},[1621,1626],{"type":27,"tag":39,"props":1622,"children":1623},{},[1624],{"type":32,"value":1625},"内容需要 SEO，但数据强动态",{"type":27,"tag":39,"props":1627,"children":1628},{},[1629],{"type":32,"value":1630},"你有完善的缓存策略",{"type":27,"tag":671,"props":1632,"children":1634},{"id":1633},"_23-ssg静态生成",[1635],{"type":32,"value":1636},"2.3 SSG（静态生成）",{"type":27,"tag":28,"props":1638,"children":1639},{},[1640],{"type":32,"value":1548},{"type":27,"tag":35,"props":1642,"children":1643},{},[1644,1649],{"type":27,"tag":39,"props":1645,"children":1646},{},[1647],{"type":32,"value":1648},"性能与稳定性最好",{"type":27,"tag":39,"props":1650,"children":1651},{},[1652],{"type":32,"value":1653},"更新成本在“构建时”",{"type":27,"tag":28,"props":1655,"children":1656},{},[1657],{"type":32,"value":1571},{"type":27,"tag":35,"props":1659,"children":1660},{},[1661,1666],{"type":27,"tag":39,"props":1662,"children":1663},{},[1664],{"type":32,"value":1665},"内容站、文档站、营销页",{"type":27,"tag":39,"props":1667,"children":1668},{},[1669],{"type":32,"value":1670},"更新频率不高或可接受构建延迟",{"type":27,"tag":671,"props":1672,"children":1674},{"id":1673},"_24-isr增量静态再生按需生成",[1675],{"type":32,"value":1676},"2.4 ISR（增量静态再生/按需生成）",{"type":27,"tag":28,"props":1678,"children":1679},{},[1680],{"type":32,"value":1681},"在 Nuxt 体系里，ISR 的表达可能来自：",{"type":27,"tag":35,"props":1683,"children":1684},{},[1685,1690],{"type":27,"tag":39,"props":1686,"children":1687},{},[1688],{"type":32,"value":1689},"生成策略 + 缓存策略",{"type":27,"tag":39,"props":1691,"children":1692},{},[1693],{"type":32,"value":1694},"或配合边缘缓存与按需失效",{"type":27,"tag":28,"props":1696,"children":1697},{},[1698],{"type":32,"value":1548},{"type":27,"tag":35,"props":1700,"children":1701},{},[1702,1707],{"type":27,"tag":39,"props":1703,"children":1704},{},[1705],{"type":32,"value":1706},"静态化收益 + 可控更新",{"type":27,"tag":39,"props":1708,"children":1709},{},[1710],{"type":32,"value":1711},"需要你设计“失效与再生成”",{"type":27,"tag":28,"props":1713,"children":1714},{},[1715],{"type":32,"value":1571},{"type":27,"tag":35,"props":1717,"children":1718},{},[1719,1724],{"type":27,"tag":39,"props":1720,"children":1721},{},[1722],{"type":32,"value":1723},"内容更新频繁，但仍要 SEO",{"type":27,"tag":39,"props":1725,"children":1726},{},[1727],{"type":32,"value":1728},"你希望在高峰也保持稳定",{"type":27,"tag":671,"props":1730,"children":1732},{"id":1731},"_25-预渲染prerender",[1733],{"type":32,"value":1734},"2.5 预渲染（prerender）",{"type":27,"tag":28,"props":1736,"children":1737},{},[1738],{"type":32,"value":1548},{"type":27,"tag":35,"props":1740,"children":1741},{},[1742,1747],{"type":27,"tag":39,"props":1743,"children":1744},{},[1745],{"type":32,"value":1746},"对部分路由预先生成 HTML",{"type":27,"tag":39,"props":1748,"children":1749},{},[1750],{"type":32,"value":1751},"适合混合站点",{"type":27,"tag":28,"props":1753,"children":1754},{},[1755],{"type":32,"value":1571},{"type":27,"tag":35,"props":1757,"children":1758},{},[1759,1764],{"type":27,"tag":39,"props":1760,"children":1761},{},[1762],{"type":32,"value":1763},"首页/核心落地页需要 SEO",{"type":27,"tag":39,"props":1765,"children":1766},{},[1767],{"type":32,"value":1768},"工具页/用户页不需要 SEO",{"type":27,"tag":542,"props":1770,"children":1771},{},[],{"type":27,"tag":78,"props":1773,"children":1775},{"id":1774},"_3-选型矩阵可直接用",[1776],{"type":32,"value":1777},"3. 选型矩阵（可直接用）",{"type":27,"tag":28,"props":1779,"children":1780},{},[1781],{"type":32,"value":1782},"你可以按路由维度做选型，而不是全站一刀切。",{"type":27,"tag":1784,"props":1785,"children":1786},"table",{},[1787,1815],{"type":27,"tag":1788,"props":1789,"children":1790},"thead",{},[1791],{"type":27,"tag":1792,"props":1793,"children":1794},"tr",{},[1795,1801,1805,1810],{"type":27,"tag":1796,"props":1797,"children":1798},"th",{},[1799],{"type":32,"value":1800},"页面类型",{"type":27,"tag":1796,"props":1802,"children":1803},{},[1804],{"type":32,"value":14},{"type":27,"tag":1796,"props":1806,"children":1807},{},[1808],{"type":32,"value":1809},"更新频率",{"type":27,"tag":1796,"props":1811,"children":1812},{},[1813],{"type":32,"value":1814},"推荐",{"type":27,"tag":1816,"props":1817,"children":1818},"tbody",{},[1819,1843,1864,1885,1906,1928],{"type":27,"tag":1792,"props":1820,"children":1821},{},[1822,1828,1833,1838],{"type":27,"tag":1823,"props":1824,"children":1825},"td",{},[1826],{"type":32,"value":1827},"文章详情",{"type":27,"tag":1823,"props":1829,"children":1830},{},[1831],{"type":32,"value":1832},"高",{"type":27,"tag":1823,"props":1834,"children":1835},{},[1836],{"type":32,"value":1837},"中",{"type":27,"tag":1823,"props":1839,"children":1840},{},[1841],{"type":32,"value":1842},"SSG/ISR",{"type":27,"tag":1792,"props":1844,"children":1845},{},[1846,1851,1855,1859],{"type":27,"tag":1823,"props":1847,"children":1848},{},[1849],{"type":32,"value":1850},"文章列表",{"type":27,"tag":1823,"props":1852,"children":1853},{},[1854],{"type":32,"value":1832},{"type":27,"tag":1823,"props":1856,"children":1857},{},[1858],{"type":32,"value":1837},{"type":27,"tag":1823,"props":1860,"children":1861},{},[1862],{"type":32,"value":1863},"SSG/ISR（注意聚合页）",{"type":27,"tag":1792,"props":1865,"children":1866},{},[1867,1872,1876,1880],{"type":27,"tag":1823,"props":1868,"children":1869},{},[1870],{"type":32,"value":1871},"产品详情",{"type":27,"tag":1823,"props":1873,"children":1874},{},[1875],{"type":32,"value":1832},{"type":27,"tag":1823,"props":1877,"children":1878},{},[1879],{"type":32,"value":1832},{"type":27,"tag":1823,"props":1881,"children":1882},{},[1883],{"type":32,"value":1884},"ISR/SSR（配缓存）",{"type":27,"tag":1792,"props":1886,"children":1887},{},[1888,1893,1897,1901],{"type":27,"tag":1823,"props":1889,"children":1890},{},[1891],{"type":32,"value":1892},"搜索结果",{"type":27,"tag":1823,"props":1894,"children":1895},{},[1896],{"type":32,"value":1837},{"type":27,"tag":1823,"props":1898,"children":1899},{},[1900],{"type":32,"value":1832},{"type":27,"tag":1823,"props":1902,"children":1903},{},[1904],{"type":32,"value":1905},"SSR/CSR（配 noindex）",{"type":27,"tag":1792,"props":1907,"children":1908},{},[1909,1914,1919,1923],{"type":27,"tag":1823,"props":1910,"children":1911},{},[1912],{"type":32,"value":1913},"用户中心",{"type":27,"tag":1823,"props":1915,"children":1916},{},[1917],{"type":32,"value":1918},"低",{"type":27,"tag":1823,"props":1920,"children":1921},{},[1922],{"type":32,"value":1832},{"type":27,"tag":1823,"props":1924,"children":1925},{},[1926],{"type":32,"value":1927},"CSR",{"type":27,"tag":1792,"props":1929,"children":1930},{},[1931,1936,1941,1945],{"type":27,"tag":1823,"props":1932,"children":1933},{},[1934],{"type":32,"value":1935},"工具页",{"type":27,"tag":1823,"props":1937,"children":1938},{},[1939],{"type":32,"value":1940},"低/中",{"type":27,"tag":1823,"props":1942,"children":1943},{},[1944],{"type":32,"value":1837},{"type":27,"tag":1823,"props":1946,"children":1947},{},[1948],{"type":32,"value":1949},"CSR + 预渲染核心路由",{"type":27,"tag":542,"props":1951,"children":1952},{},[],{"type":27,"tag":78,"props":1954,"children":1956},{"id":1955},"_4-混合渲染真正的生产最优解",[1957],{"type":32,"value":1958},"4. 混合渲染：真正的生产最优解",{"type":27,"tag":28,"props":1960,"children":1961},{},[1962],{"type":32,"value":1963},"生产上最常见的模式是混合：",{"type":27,"tag":35,"props":1965,"children":1966},{},[1967,1972,1977],{"type":27,"tag":39,"props":1968,"children":1969},{},[1970],{"type":32,"value":1971},"公共内容：静态化（SSG/ISR）+ CDN",{"type":27,"tag":39,"props":1973,"children":1974},{},[1975],{"type":32,"value":1976},"用户态内容：CSR 或 SSR（private/no-store）",{"type":27,"tag":39,"props":1978,"children":1979},{},[1980],{"type":32,"value":1981},"关键落地页：预渲染",{"type":27,"tag":28,"props":1983,"children":1984},{},[1985],{"type":32,"value":1986},"好处：",{"type":27,"tag":35,"props":1988,"children":1989},{},[1990,1995],{"type":27,"tag":39,"props":1991,"children":1992},{},[1993],{"type":32,"value":1994},"SEO 与性能兼得",{"type":27,"tag":39,"props":1996,"children":1997},{},[1998],{"type":32,"value":1999},"成本可控",{"type":27,"tag":542,"props":2001,"children":2002},{},[],{"type":27,"tag":78,"props":2004,"children":2006},{"id":2005},"_5-缓存与失效模式落地的关键",[2007],{"type":32,"value":2008},"5. 缓存与失效：模式落地的关键",{"type":27,"tag":28,"props":2010,"children":2011},{},[2012],{"type":32,"value":2013},"无论你选 SSR 还是 ISR，本质都离不开缓存。",{"type":27,"tag":28,"props":2015,"children":2016},{},[2017],{"type":32,"value":2018},"建议把缓存分层：",{"type":27,"tag":35,"props":2020,"children":2021},{},[2022,2027,2032,2037],{"type":27,"tag":39,"props":2023,"children":2024},{},[2025],{"type":32,"value":2026},"浏览器",{"type":27,"tag":39,"props":2028,"children":2029},{},[2030],{"type":32,"value":2031},"CDN",{"type":27,"tag":39,"props":2033,"children":2034},{},[2035],{"type":32,"value":2036},"应用侧（server runtime）",{"type":27,"tag":39,"props":2038,"children":2039},{},[2040],{"type":32,"value":2041},"数据侧（Redis/DB）",{"type":27,"tag":28,"props":2043,"children":2044},{},[2045],{"type":32,"value":2046},"并给每条路由明确：",{"type":27,"tag":35,"props":2048,"children":2049},{},[2050,2055,2060],{"type":27,"tag":39,"props":2051,"children":2052},{},[2053],{"type":32,"value":2054},"是否 public/private",{"type":27,"tag":39,"props":2056,"children":2057},{},[2058],{"type":32,"value":2059},"TTL 多久",{"type":27,"tag":39,"props":2061,"children":2062},{},[2063],{"type":32,"value":2064},"写操作后如何失效",{"type":27,"tag":542,"props":2066,"children":2067},{},[],{"type":27,"tag":78,"props":2069,"children":2071},{"id":2070},"_6-常见误区",[2072],{"type":32,"value":2073},"6. 常见误区",{"type":27,"tag":35,"props":2075,"children":2076},{},[2077,2082,2087],{"type":27,"tag":39,"props":2078,"children":2079},{},[2080],{"type":32,"value":2081},"“SSR 一定更快”：不一定，TTFB 可能更慢；LCP 受资源与主线程影响更大",{"type":27,"tag":39,"props":2083,"children":2084},{},[2085],{"type":32,"value":2086},"“SSG 一定更好”：构建成本与发布延迟可能无法接受",{"type":27,"tag":39,"props":2088,"children":2089},{},[2090],{"type":32,"value":2091},"“全站一个模式最省事”：短期省事，长期很难优化与扩展",{"type":27,"tag":542,"props":2093,"children":2094},{},[],{"type":27,"tag":78,"props":2096,"children":2098},{"id":2097},"_7-上线检查清单",[2099],{"type":32,"value":2100},"7. 上线检查清单",{"type":27,"tag":35,"props":2102,"children":2105},{"className":2103},[2104],"contains-task-list",[2106,2118,2127,2136,2145],{"type":27,"tag":39,"props":2107,"children":2110},{"className":2108},[2109],"task-list-item",[2111,2116],{"type":27,"tag":2112,"props":2113,"children":2115},"input",{"disabled":445,"type":2114},"checkbox",[],{"type":32,"value":2117}," 按路由明确 SEO 需求（哪些可索引）",{"type":27,"tag":39,"props":2119,"children":2121},{"className":2120},[2109],[2122,2125],{"type":27,"tag":2112,"props":2123,"children":2124},{"disabled":445,"type":2114},[],{"type":32,"value":2126}," 用户态页面是否 private/no-store",{"type":27,"tag":39,"props":2128,"children":2130},{"className":2129},[2109],[2131,2134],{"type":27,"tag":2112,"props":2132,"children":2133},{"disabled":445,"type":2114},[],{"type":32,"value":2135}," 公共内容是否走 CDN 并有合理 TTL",{"type":27,"tag":39,"props":2137,"children":2139},{"className":2138},[2109],[2140,2143],{"type":27,"tag":2112,"props":2141,"children":2142},{"disabled":445,"type":2114},[],{"type":32,"value":2144}," 更新路径是否有失效机制（发布事件）",{"type":27,"tag":39,"props":2146,"children":2148},{"className":2147},[2109],[2149,2152],{"type":27,"tag":2112,"props":2150,"children":2151},{"disabled":445,"type":2114},[],{"type":32,"value":2153}," 是否有 RUM/日志来验证效果",{"type":27,"tag":542,"props":2155,"children":2156},{},[],{"type":27,"tag":78,"props":2158,"children":2159},{"id":370},[2160],{"type":32,"value":370},{"type":27,"tag":28,"props":2162,"children":2163},{},[2164],{"type":32,"value":2165},"Nuxt 渲染模式选型的正确做法是：",{"type":27,"tag":35,"props":2167,"children":2168},{},[2169,2174,2179],{"type":27,"tag":39,"props":2170,"children":2171},{},[2172],{"type":32,"value":2173},"以“页面类型”而不是“站点整体”做选择",{"type":27,"tag":39,"props":2175,"children":2176},{},[2177],{"type":32,"value":2178},"把缓存与失效当成一等公民",{"type":27,"tag":39,"props":2180,"children":2181},{},[2182],{"type":32,"value":2183},"用观测验证，而不是凭感觉",{"title":7,"searchDepth":415,"depth":415,"links":2185},[2186,2187,2188,2195,2196,2197,2198,2199,2200],{"id":1434,"depth":418,"text":1423},{"id":1492,"depth":418,"text":1495},{"id":1534,"depth":418,"text":1537,"children":2189},[2190,2191,2192,2193,2194],{"id":1540,"depth":415,"text":1543},{"id":1593,"depth":415,"text":1596},{"id":1633,"depth":415,"text":1636},{"id":1673,"depth":415,"text":1676},{"id":1731,"depth":415,"text":1734},{"id":1774,"depth":418,"text":1777},{"id":1955,"depth":418,"text":1958},{"id":2005,"depth":418,"text":2008},{"id":2070,"depth":418,"text":2073},{"id":2097,"depth":418,"text":2100},{"id":370,"depth":418,"text":370},"content:topics:nuxt:nuxt-rendering-modes-guide.md","topics/nuxt/nuxt-rendering-modes-guide.md","topics/nuxt/nuxt-rendering-modes-guide",{"_path":2205,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2206,"description":2207,"date":2208,"topic":5,"author":11,"tags":2209,"image":2214,"featured":445,"readingTime":2215,"body":2216,"_type":426,"_id":2742,"_source":428,"_file":2743,"_stem":2744,"_extension":431},"/topics/nuxt/nuxt4-major-updates-overview","Nuxt 4 重大更新全面解读：架构升级与开发体验革新","深入解析 Nuxt 4 的重大更新，包括新目录结构、Nitro 2.0 引擎、兼容性层变化、性能优化等核心改进，帮助开发者全面了解新版本特性并做好升级准备。","2026-01-18",[2210,2211,440,2212,2213],"Nuxt 4","Vue","全栈框架","版本升级","/images/topics/nuxt/nuxt4-features-overview.jpg",16,{"type":24,"children":2217,"toc":2703},[2218,2224,2230,2235,2240,2246,2252,2257,2266,2274,2282,2288,2293,2304,2310,2319,2325,2331,2336,2345,2351,2360,2366,2375,2381,2387,2396,2402,2411,2417,2426,2432,2438,2447,2453,2462,2468,2479,2488,2494,2500,2509,2515,2524,2530,2539,2545,2551,2560,2566,2575,2581,2587,2597,2603,2612,2618,2623,2628,2633,2651,2654,2659],{"type":27,"tag":78,"props":2219,"children":2221},{"id":2220},"nuxt-4-重大更新全面解读",[2222],{"type":32,"value":2223},"Nuxt 4 重大更新全面解读",{"type":27,"tag":78,"props":2225,"children":2227},{"id":2226},"引言nuxt-的又一次进化",[2228],{"type":32,"value":2229},"引言：Nuxt 的又一次进化",{"type":27,"tag":28,"props":2231,"children":2232},{},[2233],{"type":32,"value":2234},"Nuxt 4 的发布标志着这个 Vue 生态中最受欢迎的全栈框架又迈入了新阶段。从 Nuxt 2 到 Nuxt 3 是一次彻底重写，而 Nuxt 3 到 Nuxt 4 则是在成熟架构上的精进打磨——更清晰的目录结构、更强大的引擎、更好的开发体验。",{"type":27,"tag":28,"props":2236,"children":2237},{},[2238],{"type":32,"value":2239},"这篇文章将全面解读 Nuxt 4 的核心变化，帮助你理解这些改动背后的设计理念，以及它们将如何影响你的日常开发。",{"type":27,"tag":78,"props":2241,"children":2243},{"id":2242},"第一部分新目录结构",[2244],{"type":32,"value":2245},"第一部分：新目录结构",{"type":27,"tag":671,"props":2247,"children":2249},{"id":2248},"_11-从扁平到分层",[2250],{"type":32,"value":2251},"1.1 从扁平到分层",{"type":27,"tag":28,"props":2253,"children":2254},{},[2255],{"type":32,"value":2256},"Nuxt 4 引入了新的目录结构，将应用代码与配置分离：",{"type":27,"tag":2258,"props":2259,"children":2261},"pre",{"code":2260},"# Nuxt 3 目录结构\nproject/\n├── .nuxt/\n├── app.vue\n├── components/\n├── composables/\n├── layouts/\n├── middleware/\n├── pages/\n├── plugins/\n├── public/\n├── server/\n├── nuxt.config.ts\n└── package.json\n\n# Nuxt 4 新目录结构\nproject/\n├── .nuxt/\n├── app/                  # 应用代码集中在 app/ 目录\n│   ├── app.vue\n│   ├── components/\n│   ├── composables/\n│   ├── layouts/\n│   ├── middleware/\n│   ├── pages/\n│   └── plugins/\n├── public/\n├── server/\n├── nuxt.config.ts\n└── package.json\n",[2262],{"type":27,"tag":479,"props":2263,"children":2264},{"__ignoreMap":7},[2265],{"type":32,"value":2260},{"type":27,"tag":28,"props":2267,"children":2268},{},[2269],{"type":27,"tag":460,"props":2270,"children":2271},{},[2272],{"type":32,"value":2273},"为什么这样设计？",{"type":27,"tag":2258,"props":2275,"children":2277},{"code":2276},"┌────────────────────────────────────────────────────────────┐\n│              新目录结构的设计理念                            │\n├────────────────────────────────────────────────────────────┤\n│                                                            │\n│  1. 关注点分离                                             │\n│     ├── app/ - 客户端/同构代码                             │\n│     ├── server/ - 服务端代码                               │\n│     └── 根目录 - 配置和公共资源                             │\n│                                                            │\n│  2. 更清晰的项目边界                                       │\n│     ├── Monorepo 友好                                      │\n│     ├── 多应用项目更清晰                                   │\n│     └── 与其他框架惯例对齐                                 │\n│                                                            │\n│  3. 未来扩展性                                             │\n│     ├── 为多前端支持做准备                                 │\n│     └── 便于工具链识别和处理                               │\n│                                                            │\n└────────────────────────────────────────────────────────────┘\n",[2278],{"type":27,"tag":479,"props":2279,"children":2280},{"__ignoreMap":7},[2281],{"type":32,"value":2276},{"type":27,"tag":671,"props":2283,"children":2285},{"id":2284},"_12-向后兼容",[2286],{"type":32,"value":2287},"1.2 向后兼容",{"type":27,"tag":28,"props":2289,"children":2290},{},[2291],{"type":32,"value":2292},"Nuxt 4 提供了兼容性选项，允许继续使用旧目录结构：",{"type":27,"tag":2258,"props":2294,"children":2299},{"code":2295,"language":2296,"meta":7,"className":2297},"// nuxt.config.ts\nexport default defineNuxtConfig({\n  future: {\n    compatibilityVersion: 4  // 启用 Nuxt 4 特性\n  },\n  \n  // 如果需要继续使用旧目录结构\n  srcDir: './',  // 而不是 'app/'\n  \n  // 或者自定义目录\n  dir: {\n    app: 'src',\n    pages: 'src/pages',\n    layouts: 'src/layouts'\n  }\n});\n","typescript",[2298],"language-typescript",[2300],{"type":27,"tag":479,"props":2301,"children":2302},{"__ignoreMap":7},[2303],{"type":32,"value":2295},{"type":27,"tag":671,"props":2305,"children":2307},{"id":2306},"_13-appconfigts-变化",[2308],{"type":32,"value":2309},"1.3 app.config.ts 变化",{"type":27,"tag":2258,"props":2311,"children":2314},{"code":2312,"language":2296,"meta":7,"className":2313},"// Nuxt 3: app.config.ts 在项目根目录\n// Nuxt 4: app.config.ts 移入 app/ 目录\n\n// app/app.config.ts\nexport default defineAppConfig({\n  ui: {\n    primary: 'green',\n    gray: 'slate'\n  },\n  \n  // 类型安全的应用配置\n  meta: {\n    name: 'My App',\n    description: 'A Nuxt 4 Application'\n  }\n});\n\n// 使用方式不变\nconst appConfig = useAppConfig();\nconsole.log(appConfig.ui.primary);  // 'green'\n",[2298],[2315],{"type":27,"tag":479,"props":2316,"children":2317},{"__ignoreMap":7},[2318],{"type":32,"value":2312},{"type":27,"tag":78,"props":2320,"children":2322},{"id":2321},"第二部分nitro-20-引擎升级",[2323],{"type":32,"value":2324},"第二部分：Nitro 2.0 引擎升级",{"type":27,"tag":671,"props":2326,"children":2328},{"id":2327},"_21-性能提升",[2329],{"type":32,"value":2330},"2.1 性能提升",{"type":27,"tag":28,"props":2332,"children":2333},{},[2334],{"type":32,"value":2335},"Nitro 2.0 带来了显著的性能改进：",{"type":27,"tag":2258,"props":2337,"children":2340},{"code":2338,"language":2296,"meta":7,"className":2339},"// 冷启动时间优化\n// Nitro 1.x: ~150ms\n// Nitro 2.0: ~80ms (约 47% 提升)\n\n// 内存占用优化\n// 同样的应用，内存占用减少约 20%\n\n// 原因：\n// - 更高效的模块加载\n// - 优化的树摇（tree-shaking）\n// - 减少运行时开销\n",[2298],[2341],{"type":27,"tag":479,"props":2342,"children":2343},{"__ignoreMap":7},[2344],{"type":32,"value":2338},{"type":27,"tag":671,"props":2346,"children":2348},{"id":2347},"_22-新的路由系统",[2349],{"type":32,"value":2350},"2.2 新的路由系统",{"type":27,"tag":2258,"props":2352,"children":2355},{"code":2353,"language":2296,"meta":7,"className":2354},"// server/routes/api/[...slug].ts\n\n// Nitro 2.0 新的路由定义方式\nexport default defineEventHandler({\n  // 路由级别配置\n  config: {\n    // 缓存配置\n    cache: {\n      maxAge: 60,\n      staleMaxAge: 3600,\n      swr: true\n    },\n    \n    // CORS 配置\n    cors: {\n      origin: ['https://example.com'],\n      methods: ['GET', 'POST']\n    }\n  },\n  \n  // 处理函数\n  handler: async (event) => {\n    const slug = event.context.params?.slug;\n    return { data: await fetchData(slug) };\n  }\n});\n\n// 支持中间件链\nexport default defineEventHandler({\n  onRequest: [authMiddleware, rateLimitMiddleware],\n  onBeforeResponse: [logMiddleware],\n  \n  handler: (event) => {\n    return { message: 'Hello' };\n  }\n});\n",[2298],[2356],{"type":27,"tag":479,"props":2357,"children":2358},{"__ignoreMap":7},[2359],{"type":32,"value":2353},{"type":27,"tag":671,"props":2361,"children":2363},{"id":2362},"_23-增强的数据获取",[2364],{"type":32,"value":2365},"2.3 增强的数据获取",{"type":27,"tag":2258,"props":2367,"children":2370},{"code":2368,"language":2296,"meta":7,"className":2369},"// Nitro 2.0 改进的 $fetch\n\n// 自动请求去重\nconst [user, posts] = await Promise.all([\n  $fetch('/api/user/1'),\n  $fetch('/api/user/1')  // 相同请求自动去重\n]);\n\n// 请求拦截器\nexport default defineNuxtPlugin(() => {\n  const { $fetch } = useNuxtApp();\n  \n  // 全局请求配置\n  globalThis.$fetch = $fetch.create({\n    onRequest({ request, options }) {\n      options.headers = {\n        ...options.headers,\n        Authorization: `Bearer ${getToken()}`\n      };\n    },\n    \n    onResponseError({ response }) {\n      if (response.status === 401) {\n        navigateTo('/login');\n      }\n    }\n  });\n});\n",[2298],[2371],{"type":27,"tag":479,"props":2372,"children":2373},{"__ignoreMap":7},[2374],{"type":32,"value":2368},{"type":27,"tag":78,"props":2376,"children":2378},{"id":2377},"第三部分兼容性层变化",[2379],{"type":32,"value":2380},"第三部分：兼容性层变化",{"type":27,"tag":671,"props":2382,"children":2384},{"id":2383},"_31-移除的废弃-api",[2385],{"type":32,"value":2386},"3.1 移除的废弃 API",{"type":27,"tag":2258,"props":2388,"children":2391},{"code":2389,"language":2296,"meta":7,"className":2390},"// Nuxt 4 移除了 Nuxt 3 中标记为废弃的 API\n\n// ❌ 已移除\nimport { defineNuxtRouteMiddleware } from '#app'\n\n// ✅ 使用新的 API\nimport { defineNuxtRouteMiddleware } from 'nuxt/app'\n\n// ❌ 已移除\nconst nuxtApp = useNuxtApp()\nnuxtApp.$router  // 不再有 $ 前缀\n\n// ✅ 使用 composables\nconst router = useRouter()\n\n// ❌ 已移除\nuseAsyncData('key', () => fetch(), { lazy: true })\n\n// ✅ 使用 useLazyAsyncData\nuseLazyAsyncData('key', () => fetch())\n",[2298],[2392],{"type":27,"tag":479,"props":2393,"children":2394},{"__ignoreMap":7},[2395],{"type":32,"value":2389},{"type":27,"tag":671,"props":2397,"children":2399},{"id":2398},"_32-类型系统改进",[2400],{"type":32,"value":2401},"3.2 类型系统改进",{"type":27,"tag":2258,"props":2403,"children":2406},{"code":2404,"language":2296,"meta":7,"className":2405},"// Nuxt 4 增强的类型推导\n\n// 页面元数据类型\n// pages/dashboard.vue\n\u003Cscript setup lang=\"ts\">\ndefinePageMeta({\n  // 类型自动推导，IDE 自动补全\n  layout: 'admin',  // 只能填已定义的布局\n  middleware: ['auth'],  // 只能填已定义的中间件\n  \n  // 自定义元数据\n  title: '仪表盘',\n  requiresAuth: true\n});\n\u003C/script>\n\n// 路由参数类型\n// pages/users/[id].vue\n\u003Cscript setup lang=\"ts\">\nconst route = useRoute('users-id');\n//             ^? RouteLocationNormalized\u003C'users-id'>\n\nroute.params.id  // 类型: string\n\u003C/script>\n\n// 运行时配置类型\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  runtimeConfig: {\n    // 私有配置（仅服务端）\n    apiSecret: '',\n    \n    // 公开配置\n    public: {\n      apiBase: ''\n    }\n  }\n});\n\n// 使用时自动推导类型\nconst config = useRuntimeConfig();\nconfig.apiSecret;  // 服务端可用\nconfig.public.apiBase;  // 客户端可用\n",[2298],[2407],{"type":27,"tag":479,"props":2408,"children":2409},{"__ignoreMap":7},[2410],{"type":32,"value":2404},{"type":27,"tag":671,"props":2412,"children":2414},{"id":2413},"_33-useasyncdata-改进",[2415],{"type":32,"value":2416},"3.3 useAsyncData 改进",{"type":27,"tag":2258,"props":2418,"children":2421},{"code":2419,"language":2296,"meta":7,"className":2420},"// Nuxt 4 中 useAsyncData 的改进\n\n// 改进 1：更好的错误处理\nconst { data, error, status } = await useAsyncData('users', () => $fetch('/api/users'));\n\n// status 新增更多状态\n// 'idle' | 'pending' | 'success' | 'error'\n\n// 改进 2：简化的刷新机制\nconst { refresh, clear } = await useAsyncData('users', () => $fetch('/api/users'));\n\n// 带参数刷新\nawait refresh({ dedupe: true });\n\n// 清除缓存\nclear();\n\n// 改进 3：深度响应式默认关闭\nconst { data } = await useAsyncData('config', () => $fetch('/api/config'), {\n  deep: false  // 默认 false，提升性能\n});\n\n// 需要深度响应式时显式开启\nconst { data } = await useAsyncData('form', () => $fetch('/api/form'), {\n  deep: true\n});\n",[2298],[2422],{"type":27,"tag":479,"props":2423,"children":2424},{"__ignoreMap":7},[2425],{"type":32,"value":2419},{"type":27,"tag":78,"props":2427,"children":2429},{"id":2428},"第四部分开发体验改进",[2430],{"type":32,"value":2431},"第四部分：开发体验改进",{"type":27,"tag":671,"props":2433,"children":2435},{"id":2434},"_41-nuxt-devtools-增强",[2436],{"type":32,"value":2437},"4.1 Nuxt DevTools 增强",{"type":27,"tag":2258,"props":2439,"children":2442},{"code":2440,"language":2296,"meta":7,"className":2441},"// Nuxt 4 内置增强版 DevTools\n\n// 新功能：\n// 1. 组件性能分析\n// - 渲染时间追踪\n// - 不必要渲染检测\n// - 内存使用监控\n\n// 2. 数据流可视化\n// - useAsyncData 调用时序图\n// - 数据缓存状态\n// - 请求去重可视化\n\n// 3. 路由调试\n// - 路由匹配过程\n// - 中间件执行顺序\n// - 导航守卫状态\n\n// 启用高级功能\nexport default defineNuxtConfig({\n  devtools: {\n    enabled: true,\n    \n    // 新选项\n    timeline: {\n      enabled: true  // 启用时间线\n    }\n  }\n});\n",[2298],[2443],{"type":27,"tag":479,"props":2444,"children":2445},{"__ignoreMap":7},[2446],{"type":32,"value":2440},{"type":27,"tag":671,"props":2448,"children":2450},{"id":2449},"_42-热更新优化",[2451],{"type":32,"value":2452},"4.2 热更新优化",{"type":27,"tag":2258,"props":2454,"children":2457},{"code":2455,"language":2296,"meta":7,"className":2456},"// Nuxt 4 大幅改进了热更新体验\n\n// 1. 更快的 HMR\n// - 组件变更：\u003C 100ms\n// - 页面变更：\u003C 200ms\n// - 配置变更：\u003C 1s\n\n// 2. 保持状态的更新\n// composables 更新不再丢失组件状态\nconst count = ref(0);  // 更新文件后，值保持\n\n// 3. 错误恢复\n// 修复语法错误后自动恢复，无需重启\n",[2298],[2458],{"type":27,"tag":479,"props":2459,"children":2460},{"__ignoreMap":7},[2461],{"type":32,"value":2455},{"type":27,"tag":671,"props":2463,"children":2465},{"id":2464},"_43-错误处理增强",[2466],{"type":32,"value":2467},"4.3 错误处理增强",{"type":27,"tag":2258,"props":2469,"children":2474},{"code":2470,"language":2471,"meta":7,"className":2472},"\u003C!-- app/error.vue - 增强的错误页面 -->\n\u003Ctemplate>\n  \u003Cdiv class=\"error-page\">\n    \u003Ch1>{{ error.statusCode }}\u003C/h1>\n    \u003Cp>{{ error.message }}\u003C/p>\n    \n    \u003C!-- Nuxt 4 新增：错误堆栈（开发环境） -->\n    \u003Cpre v-if=\"isDev && error.stack\">{{ error.stack }}\u003C/pre>\n    \n    \u003C!-- 新增：错误上下文 -->\n    \u003Cdetails v-if=\"error.data\">\n      \u003Csummary>详细信息\u003C/summary>\n      \u003Cpre>{{ error.data }}\u003C/pre>\n    \u003C/details>\n    \n    \u003Cbutton @click=\"handleError\">重试\u003C/button>\n  \u003C/div>\n\u003C/template>\n\n\u003Cscript setup lang=\"ts\">\nconst props = defineProps\u003C{\n  error: {\n    statusCode: number\n    message: string\n    stack?: string\n    data?: Record\u003Cstring, unknown>\n  }\n}>();\n\nconst isDev = process.dev;\n\nfunction handleError() {\n  clearError({ redirect: '/' });\n}\n\u003C/script>\n","vue",[2473],"language-vue",[2475],{"type":27,"tag":479,"props":2476,"children":2477},{"__ignoreMap":7},[2478],{"type":32,"value":2470},{"type":27,"tag":2258,"props":2480,"children":2483},{"code":2481,"language":2296,"meta":7,"className":2482},"// server/api/users.ts - 增强的服务端错误\n\nexport default defineEventHandler((event) => {\n  const id = getRouterParam(event, 'id');\n  \n  if (!id) {\n    throw createError({\n      statusCode: 400,\n      message: '缺少用户 ID',\n      \n      // Nuxt 4 新增：结构化错误数据\n      data: {\n        field: 'id',\n        constraint: 'required'\n      }\n    });\n  }\n  \n  // 业务错误\n  throw createError({\n    statusCode: 404,\n    message: '用户不存在',\n    data: {\n      userId: id,\n      suggestion: '请检查用户 ID 是否正确'\n    }\n  });\n});\n",[2298],[2484],{"type":27,"tag":479,"props":2485,"children":2486},{"__ignoreMap":7},[2487],{"type":32,"value":2481},{"type":27,"tag":78,"props":2489,"children":2491},{"id":2490},"第五部分性能优化特性",[2492],{"type":32,"value":2493},"第五部分：性能优化特性",{"type":27,"tag":671,"props":2495,"children":2497},{"id":2496},"_51-更智能的代码分割",[2498],{"type":32,"value":2499},"5.1 更智能的代码分割",{"type":27,"tag":2258,"props":2501,"children":2504},{"code":2502,"language":2296,"meta":7,"className":2503},"// Nuxt 4 的自动代码分割更加智能\n\n// 自动路由分割\n// pages/dashboard/\n//   index.vue      -> chunks/dashboard.js\n//   settings.vue   -> chunks/dashboard-settings.js\n//   analytics.vue  -> chunks/dashboard-analytics.js\n\n// 组件级分割\n// components/\n//   HeavyChart.vue -> chunks/heavy-chart.js (自动延迟加载)\n\n// 手动优化\nexport default defineNuxtConfig({\n  vite: {\n    build: {\n      rollupOptions: {\n        output: {\n          // 自定义分块策略\n          manualChunks: {\n            'vendor-vue': ['vue', 'vue-router', 'pinia'],\n            'vendor-ui': ['element-plus']\n          }\n        }\n      }\n    }\n  }\n});\n",[2298],[2505],{"type":27,"tag":479,"props":2506,"children":2507},{"__ignoreMap":7},[2508],{"type":32,"value":2502},{"type":27,"tag":671,"props":2510,"children":2512},{"id":2511},"_52-图片优化增强",[2513],{"type":32,"value":2514},"5.2 图片优化增强",{"type":27,"tag":2258,"props":2516,"children":2519},{"code":2517,"language":2471,"meta":7,"className":2518},"\u003C!-- Nuxt 4 的 nuxt-img 增强 -->\n\u003Ctemplate>\n  \u003CNuxtImg\n    src=\"/images/hero.jpg\"\n    \n    \u003C!-- 新增：自动格式选择 -->\n    format=\"webp,avif\"\n    \n    \u003C!-- 新增：艺术指导响应式 -->\n    :sources=\"[\n      { media: '(max-width: 640px)', src: '/images/hero-mobile.jpg' },\n      { media: '(max-width: 1024px)', src: '/images/hero-tablet.jpg' }\n    ]\"\n    \n    \u003C!-- 新增：模糊占位符 -->\n    placeholder=\"/images/hero-blur.jpg\"\n    \n    \u003C!-- 新增：性能提示 -->\n    :priority=\"true\"\n    fetchpriority=\"high\"\n  />\n\u003C/template>\n\n\u003Cscript setup>\n// 编程式使用\nconst img = useImage();\n\n// 生成优化后的 URL\nconst optimizedUrl = img('/images/photo.jpg', {\n  width: 800,\n  height: 600,\n  format: 'webp',\n  quality: 80\n});\n\u003C/script>\n",[2473],[2520],{"type":27,"tag":479,"props":2521,"children":2522},{"__ignoreMap":7},[2523],{"type":32,"value":2517},{"type":27,"tag":671,"props":2525,"children":2527},{"id":2526},"_53-服务端渲染优化",[2528],{"type":32,"value":2529},"5.3 服务端渲染优化",{"type":27,"tag":2258,"props":2531,"children":2534},{"code":2532,"language":2296,"meta":7,"className":2533},"// Nuxt 4 SSR 性能优化\n\n// 1. 流式 SSR\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  nitro: {\n    // 启用流式 SSR\n    experimental: {\n      wasm: true\n    }\n  },\n  \n  // 组件流式渲染\n  experimental: {\n    componentIslands: true,  // 组件岛\n    payloadExtraction: true  // Payload 提取\n  }\n});\n\n// 2. 选择性 Hydration\n// pages/article/[id].vue\n\u003Ctemplate>\n  \u003Carticle>\n    \u003C!-- 静态内容，不需要 hydration -->\n    \u003CNuxtIsland name=\"ArticleContent\" :props=\"{ content }\" />\n    \n    \u003C!-- 需要交互的部分 -->\n    \u003CCommentSection :articleId=\"id\" />\n  \u003C/article>\n\u003C/template>\n\n// 3. 预加载优化\n\u003Cscript setup>\n// 智能预加载\nconst { data } = await useAsyncData('article', () => $fetch('/api/article/' + id), {\n  // 预加载相关数据\n  preload: [\n    () => $fetch('/api/comments/' + id),\n    () => $fetch('/api/related/' + id)\n  ]\n});\n\u003C/script>\n",[2298],[2535],{"type":27,"tag":479,"props":2536,"children":2537},{"__ignoreMap":7},[2538],{"type":32,"value":2532},{"type":27,"tag":78,"props":2540,"children":2542},{"id":2541},"第六部分模块生态更新",[2543],{"type":32,"value":2544},"第六部分：模块生态更新",{"type":27,"tag":671,"props":2546,"children":2548},{"id":2547},"_61-官方模块适配",[2549],{"type":32,"value":2550},"6.1 官方模块适配",{"type":27,"tag":2258,"props":2552,"children":2555},{"code":2553,"language":2296,"meta":7,"className":2554},"// 主要官方模块的 Nuxt 4 兼容版本\n\n// @nuxtjs/i18n v9\nexport default defineNuxtConfig({\n  modules: ['@nuxtjs/i18n'],\n  \n  i18n: {\n    // 新增：编译时优化\n    bundle: {\n      optimizeTranslations: true\n    },\n    \n    // 新增：类型生成\n    types: 'composition'\n  }\n});\n\n// @nuxt/content v3\nexport default defineNuxtConfig({\n  modules: ['@nuxt/content'],\n  \n  content: {\n    // 新增：更强的查询 API\n    experimental: {\n      clientDB: true,\n      stripQueryParameters: true\n    }\n  }\n});\n\n// @pinia/nuxt v0.6\nexport default defineNuxtConfig({\n  modules: ['@pinia/nuxt'],\n  \n  pinia: {\n    // 新增：自动导入优化\n    storesDirs: ['./stores/**']\n  }\n});\n",[2298],[2556],{"type":27,"tag":479,"props":2557,"children":2558},{"__ignoreMap":7},[2559],{"type":32,"value":2553},{"type":27,"tag":671,"props":2561,"children":2563},{"id":2562},"_62-创建-nuxt-4-兼容模块",[2564],{"type":32,"value":2565},"6.2 创建 Nuxt 4 兼容模块",{"type":27,"tag":2258,"props":2567,"children":2570},{"code":2568,"language":2296,"meta":7,"className":2569},"// 模块开发的新约定\n\n// my-module/src/module.ts\nimport { defineNuxtModule, createResolver } from '@nuxt/kit'\n\nexport default defineNuxtModule({\n  meta: {\n    name: 'my-module',\n    configKey: 'myModule',\n    \n    // Nuxt 4 要求\n    compatibility: {\n      nuxt: '^4.0.0'\n    }\n  },\n  \n  defaults: {\n    enabled: true\n  },\n  \n  setup(options, nuxt) {\n    const resolver = createResolver(import.meta.url);\n    \n    // 使用新的 hook API\n    nuxt.hook('app:resolve', (app) => {\n      // app 配置\n    });\n    \n    // 添加运行时插件\n    addPlugin(resolver.resolve('./runtime/plugin'));\n    \n    // 添加组件\n    addComponentsDir({\n      path: resolver.resolve('./runtime/components'),\n      prefix: 'MyModule'\n    });\n  }\n});\n",[2298],[2571],{"type":27,"tag":479,"props":2572,"children":2573},{"__ignoreMap":7},[2574],{"type":32,"value":2568},{"type":27,"tag":78,"props":2576,"children":2578},{"id":2577},"第七部分迁移准备",[2579],{"type":32,"value":2580},"第七部分：迁移准备",{"type":27,"tag":671,"props":2582,"children":2584},{"id":2583},"_71-兼容性检查清单",[2585],{"type":32,"value":2586},"7.1 兼容性检查清单",{"type":27,"tag":2258,"props":2588,"children":2592},{"code":2589,"language":426,"meta":7,"className":2590},"## Nuxt 4 迁移检查清单\n\n### 依赖版本\n- [ ] Node.js >= 20\n- [ ] Vue >= 3.4\n- [ ] TypeScript >= 5.3（推荐）\n\n### 代码检查\n- [ ] 移除已废弃的 API 调用\n- [ ] 更新 composables 导入路径\n- [ ] 检查 useAsyncData 用法\n- [ ] 审查中间件语法\n\n### 目录结构\n- [ ] 决定是否采用新目录结构\n- [ ] 移动文件到 app/ 目录（如果采用）\n- [ ] 更新 nuxt.config.ts 配置\n\n### 模块更新\n- [ ] 更新官方模块到兼容版本\n- [ ] 检查第三方模块兼容性\n- [ ] 更新自定义模块\n\n### 测试\n- [ ] 运行全部测试套件\n- [ ] 验证 SSR/SSG 输出\n- [ ] 检查 hydration 错误\n- [ ] 性能基准测试\n",[2591],"language-markdown",[2593],{"type":27,"tag":479,"props":2594,"children":2595},{"__ignoreMap":7},[2596],{"type":32,"value":2589},{"type":27,"tag":671,"props":2598,"children":2600},{"id":2599},"_72-渐进式升级路径",[2601],{"type":32,"value":2602},"7.2 渐进式升级路径",{"type":27,"tag":2258,"props":2604,"children":2607},{"code":2605,"language":2296,"meta":7,"className":2606},"// 使用 compatibilityVersion 实现渐进升级\n\n// 阶段 1：启用 Nuxt 4 特性（保持旧目录结构）\nexport default defineNuxtConfig({\n  future: {\n    compatibilityVersion: 4\n  },\n  srcDir: './'  // 保持旧目录结构\n});\n\n// 阶段 2：迁移到新目录结构\n// 1. 创建 app/ 目录\n// 2. 移动文件\n// 3. 更新导入路径\n\n// 阶段 3：完全升级\nexport default defineNuxtConfig({\n  // 移除 future 配置，默认使用 Nuxt 4 行为\n});\n",[2298],[2608],{"type":27,"tag":479,"props":2609,"children":2610},{"__ignoreMap":7},[2611],{"type":32,"value":2605},{"type":27,"tag":78,"props":2613,"children":2615},{"id":2614},"结语稳步前进的进化",[2616],{"type":32,"value":2617},"结语：稳步前进的进化",{"type":27,"tag":28,"props":2619,"children":2620},{},[2621],{"type":32,"value":2622},"Nuxt 4 不是一次颠覆性的重写，而是在 Nuxt 3 坚实基础上的持续改进。新的目录结构带来更好的组织性，Nitro 2.0 带来更好的性能，增强的类型系统带来更好的开发体验。",{"type":27,"tag":28,"props":2624,"children":2625},{},[2626],{"type":32,"value":2627},"对于 Nuxt 3 用户来说，升级路径相对平滑。核心概念没有变化，熟悉的 API 依然工作。Nuxt 团队显然吸取了 Nuxt 2 到 Nuxt 3 升级的经验，这次提供了更友好的迁移体验。",{"type":27,"tag":28,"props":2629,"children":2630},{},[2631],{"type":32,"value":2632},"如果你正在考虑是否升级，建议：",{"type":27,"tag":35,"props":2634,"children":2635},{},[2636,2641,2646],{"type":27,"tag":39,"props":2637,"children":2638},{},[2639],{"type":32,"value":2640},"新项目直接使用 Nuxt 4",{"type":27,"tag":39,"props":2642,"children":2643},{},[2644],{"type":32,"value":2645},"现有项目评估迁移成本后决定",{"type":27,"tag":39,"props":2647,"children":2648},{},[2649],{"type":32,"value":2650},"关注官方迁移指南的更新",{"type":27,"tag":542,"props":2652,"children":2653},{},[],{"type":27,"tag":78,"props":2655,"children":2657},{"id":2656},"参考资源",[2658],{"type":32,"value":2656},{"type":27,"tag":35,"props":2660,"children":2661},{},[2662,2673,2683,2693],{"type":27,"tag":39,"props":2663,"children":2664},{},[2665],{"type":27,"tag":390,"props":2666,"children":2670},{"href":2667,"rel":2668},"https://nuxt.com/blog/v4",[2669],"nofollow",[2671],{"type":32,"value":2672},"Nuxt 4 官方公告",{"type":27,"tag":39,"props":2674,"children":2675},{},[2676],{"type":27,"tag":390,"props":2677,"children":2680},{"href":2678,"rel":2679},"https://nuxt.com/docs/migration/upgrade",[2669],[2681],{"type":32,"value":2682},"Nuxt 4 迁移指南",{"type":27,"tag":39,"props":2684,"children":2685},{},[2686],{"type":27,"tag":390,"props":2687,"children":2690},{"href":2688,"rel":2689},"https://nitro.unjs.io/changelog",[2669],[2691],{"type":32,"value":2692},"Nitro 2.0 更新日志",{"type":27,"tag":39,"props":2694,"children":2695},{},[2696],{"type":27,"tag":390,"props":2697,"children":2700},{"href":2698,"rel":2699},"https://github.com/nuxt/nuxt/issues",[2669],[2701],{"type":32,"value":2702},"Nuxt 路线图",{"title":7,"searchDepth":415,"depth":415,"links":2704},[2705,2706,2707,2712,2717,2722,2727,2732,2736,2740,2741],{"id":2220,"depth":418,"text":2223},{"id":2226,"depth":418,"text":2229},{"id":2242,"depth":418,"text":2245,"children":2708},[2709,2710,2711],{"id":2248,"depth":415,"text":2251},{"id":2284,"depth":415,"text":2287},{"id":2306,"depth":415,"text":2309},{"id":2321,"depth":418,"text":2324,"children":2713},[2714,2715,2716],{"id":2327,"depth":415,"text":2330},{"id":2347,"depth":415,"text":2350},{"id":2362,"depth":415,"text":2365},{"id":2377,"depth":418,"text":2380,"children":2718},[2719,2720,2721],{"id":2383,"depth":415,"text":2386},{"id":2398,"depth":415,"text":2401},{"id":2413,"depth":415,"text":2416},{"id":2428,"depth":418,"text":2431,"children":2723},[2724,2725,2726],{"id":2434,"depth":415,"text":2437},{"id":2449,"depth":415,"text":2452},{"id":2464,"depth":415,"text":2467},{"id":2490,"depth":418,"text":2493,"children":2728},[2729,2730,2731],{"id":2496,"depth":415,"text":2499},{"id":2511,"depth":415,"text":2514},{"id":2526,"depth":415,"text":2529},{"id":2541,"depth":418,"text":2544,"children":2733},[2734,2735],{"id":2547,"depth":415,"text":2550},{"id":2562,"depth":415,"text":2565},{"id":2577,"depth":418,"text":2580,"children":2737},[2738,2739],{"id":2583,"depth":415,"text":2586},{"id":2599,"depth":415,"text":2602},{"id":2614,"depth":418,"text":2617},{"id":2656,"depth":418,"text":2656},"content:topics:nuxt:nuxt4-major-updates-overview.md","topics/nuxt/nuxt4-major-updates-overview.md","topics/nuxt/nuxt4-major-updates-overview",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":2746,"image":18,"imageQuery":19,"pexelsPhotoId":20,"pexelsUrl":21,"featured":6,"readingTime":22,"body":2747,"_type":426,"_id":427,"_source":428,"_file":429,"_stem":430,"_extension":431},[13,14,15,16,17],{"type":24,"children":2748,"toc":3055},[2749,2753,2760,2764,2783,2787,2791,2795,2818,2822,2826,2830,2834,2853,2857,2861,2865,2869,2884,2888,2892,2896,2911,2915,2930,2934,2938,2942,2957,2961,2965,2969,2988,2992,2996,3019,3023,3027,3031],{"type":27,"tag":28,"props":2750,"children":2751},{},[2752],{"type":32,"value":33},{"type":27,"tag":35,"props":2754,"children":2755},{},[2756],{"type":27,"tag":39,"props":2757,"children":2758},{},[2759],{"type":32,"value":43},{"type":27,"tag":28,"props":2761,"children":2762},{},[2763],{"type":32,"value":48},{"type":27,"tag":35,"props":2765,"children":2766},{},[2767,2771,2775,2779],{"type":27,"tag":39,"props":2768,"children":2769},{},[2770],{"type":32,"value":56},{"type":27,"tag":39,"props":2772,"children":2773},{},[2774],{"type":32,"value":61},{"type":27,"tag":39,"props":2776,"children":2777},{},[2778],{"type":32,"value":66},{"type":27,"tag":39,"props":2780,"children":2781},{},[2782],{"type":32,"value":71},{"type":27,"tag":28,"props":2784,"children":2785},{},[2786],{"type":32,"value":76},{"type":27,"tag":78,"props":2788,"children":2789},{"id":80},[2790],{"type":32,"value":83},{"type":27,"tag":28,"props":2792,"children":2793},{},[2794],{"type":32,"value":88},{"type":27,"tag":35,"props":2796,"children":2797},{},[2798,2802,2806,2810,2814],{"type":27,"tag":39,"props":2799,"children":2800},{},[2801],{"type":32,"value":96},{"type":27,"tag":39,"props":2803,"children":2804},{},[2805],{"type":32,"value":101},{"type":27,"tag":39,"props":2807,"children":2808},{},[2809],{"type":32,"value":106},{"type":27,"tag":39,"props":2811,"children":2812},{},[2813],{"type":32,"value":111},{"type":27,"tag":39,"props":2815,"children":2816},{},[2817],{"type":32,"value":116},{"type":27,"tag":28,"props":2819,"children":2820},{},[2821],{"type":32,"value":121},{"type":27,"tag":78,"props":2823,"children":2824},{"id":124},[2825],{"type":32,"value":127},{"type":27,"tag":28,"props":2827,"children":2828},{},[2829],{"type":32,"value":132},{"type":27,"tag":28,"props":2831,"children":2832},{},[2833],{"type":32,"value":137},{"type":27,"tag":35,"props":2835,"children":2836},{},[2837,2841,2845,2849],{"type":27,"tag":39,"props":2838,"children":2839},{},[2840],{"type":32,"value":145},{"type":27,"tag":39,"props":2842,"children":2843},{},[2844],{"type":32,"value":150},{"type":27,"tag":39,"props":2846,"children":2847},{},[2848],{"type":32,"value":155},{"type":27,"tag":39,"props":2850,"children":2851},{},[2852],{"type":32,"value":160},{"type":27,"tag":28,"props":2854,"children":2855},{},[2856],{"type":32,"value":165},{"type":27,"tag":78,"props":2858,"children":2859},{"id":168},[2860],{"type":32,"value":171},{"type":27,"tag":28,"props":2862,"children":2863},{},[2864],{"type":32,"value":176},{"type":27,"tag":28,"props":2866,"children":2867},{},[2868],{"type":32,"value":181},{"type":27,"tag":35,"props":2870,"children":2871},{},[2872,2876,2880],{"type":27,"tag":39,"props":2873,"children":2874},{},[2875],{"type":32,"value":189},{"type":27,"tag":39,"props":2877,"children":2878},{},[2879],{"type":32,"value":194},{"type":27,"tag":39,"props":2881,"children":2882},{},[2883],{"type":32,"value":199},{"type":27,"tag":28,"props":2885,"children":2886},{},[2887],{"type":32,"value":204},{"type":27,"tag":78,"props":2889,"children":2890},{"id":207},[2891],{"type":32,"value":210},{"type":27,"tag":28,"props":2893,"children":2894},{},[2895],{"type":32,"value":215},{"type":27,"tag":35,"props":2897,"children":2898},{},[2899,2903,2907],{"type":27,"tag":39,"props":2900,"children":2901},{},[2902],{"type":32,"value":223},{"type":27,"tag":39,"props":2904,"children":2905},{},[2906],{"type":32,"value":228},{"type":27,"tag":39,"props":2908,"children":2909},{},[2910],{"type":32,"value":233},{"type":27,"tag":28,"props":2912,"children":2913},{},[2914],{"type":32,"value":238},{"type":27,"tag":35,"props":2916,"children":2917},{},[2918,2922,2926],{"type":27,"tag":39,"props":2919,"children":2920},{},[2921],{"type":32,"value":246},{"type":27,"tag":39,"props":2923,"children":2924},{},[2925],{"type":32,"value":251},{"type":27,"tag":39,"props":2927,"children":2928},{},[2929],{"type":32,"value":256},{"type":27,"tag":28,"props":2931,"children":2932},{},[2933],{"type":32,"value":261},{"type":27,"tag":78,"props":2935,"children":2936},{"id":264},[2937],{"type":32,"value":267},{"type":27,"tag":28,"props":2939,"children":2940},{},[2941],{"type":32,"value":272},{"type":27,"tag":35,"props":2943,"children":2944},{},[2945,2949,2953],{"type":27,"tag":39,"props":2946,"children":2947},{},[2948],{"type":32,"value":280},{"type":27,"tag":39,"props":2950,"children":2951},{},[2952],{"type":32,"value":285},{"type":27,"tag":39,"props":2954,"children":2955},{},[2956],{"type":32,"value":290},{"type":27,"tag":28,"props":2958,"children":2959},{},[2960],{"type":32,"value":295},{"type":27,"tag":78,"props":2962,"children":2963},{"id":298},[2964],{"type":32,"value":301},{"type":27,"tag":28,"props":2966,"children":2967},{},[2968],{"type":32,"value":306},{"type":27,"tag":35,"props":2970,"children":2971},{},[2972,2976,2980,2984],{"type":27,"tag":39,"props":2973,"children":2974},{},[2975],{"type":32,"value":314},{"type":27,"tag":39,"props":2977,"children":2978},{},[2979],{"type":32,"value":319},{"type":27,"tag":39,"props":2981,"children":2982},{},[2983],{"type":32,"value":324},{"type":27,"tag":39,"props":2985,"children":2986},{},[2987],{"type":32,"value":329},{"type":27,"tag":28,"props":2989,"children":2990},{},[2991],{"type":32,"value":334},{"type":27,"tag":78,"props":2993,"children":2994},{"id":337},[2995],{"type":32,"value":337},{"type":27,"tag":35,"props":2997,"children":2998},{},[2999,3003,3007,3011,3015],{"type":27,"tag":39,"props":3000,"children":3001},{},[3002],{"type":32,"value":347},{"type":27,"tag":39,"props":3004,"children":3005},{},[3006],{"type":32,"value":352},{"type":27,"tag":39,"props":3008,"children":3009},{},[3010],{"type":32,"value":357},{"type":27,"tag":39,"props":3012,"children":3013},{},[3014],{"type":32,"value":362},{"type":27,"tag":39,"props":3016,"children":3017},{},[3018],{"type":32,"value":367},{"type":27,"tag":78,"props":3020,"children":3021},{"id":370},[3022],{"type":32,"value":370},{"type":27,"tag":28,"props":3024,"children":3025},{},[3026],{"type":32,"value":377},{"type":27,"tag":28,"props":3028,"children":3029},{},[3030],{"type":32,"value":382},{"type":27,"tag":35,"props":3032,"children":3033},{},[3034,3041,3048],{"type":27,"tag":39,"props":3035,"children":3036},{},[3037],{"type":27,"tag":390,"props":3038,"children":3039},{"href":392},[3040],{"type":32,"value":395},{"type":27,"tag":39,"props":3042,"children":3043},{},[3044],{"type":27,"tag":390,"props":3045,"children":3046},{"href":401},[3047],{"type":32,"value":404},{"type":27,"tag":39,"props":3049,"children":3050},{},[3051],{"type":27,"tag":390,"props":3052,"children":3053},{"href":410},[3054],{"type":32,"value":413},{"title":7,"searchDepth":415,"depth":415,"links":3056},[3057,3058,3059,3060,3061,3062,3063,3064],{"id":80,"depth":418,"text":83},{"id":124,"depth":418,"text":127},{"id":168,"depth":418,"text":171},{"id":207,"depth":418,"text":210},{"id":264,"depth":418,"text":267},{"id":298,"depth":418,"text":301},{"id":337,"depth":418,"text":337},{"id":370,"depth":418,"text":370},1776916089660]