[{"data":1,"prerenderedAt":392,"buildId":393},["ShallowReactive",2],{"navigation_docs":3,"rule-content-\u002Fnuxt\u002Frules\u002Fpages\u002Fsingle-root-node":104},[4,32,36,40,44,48,52,64,68,92,96,100],{"title":5,"path":6,"stem":7,"children":8,"icon":31},"CLI","\u002Fcli","1.cli\u002F1.index",[9,11,15,19,23,27],{"title":10,"path":6,"stem":7},"Run Doctor",{"title":12,"path":13,"stem":14},"Reports","\u002Fcli\u002Freports","1.cli\u002F2.reports",{"title":16,"path":17,"stem":18},"Configuration","\u002Fcli\u002Fconfiguration","1.cli\u002F3.configuration",{"title":20,"path":21,"stem":22},"CI and changed files","\u002Fcli\u002Fci","1.cli\u002F4.ci",{"title":24,"path":25,"stem":26},"Workspaces","\u002Fcli\u002Fworkspaces","1.cli\u002F5.workspaces",{"title":28,"path":29,"stem":30},"Cache and speed","\u002Fcli\u002Fcache","1.cli\u002F6.cache","i-lucide-terminal",{"title":33,"path":34,"stem":35},"Nuxt","\u002Fnuxt","2.nuxt",{"title":37,"path":38,"stem":39},"Vue","\u002Fvue","3.vue",{"title":41,"path":42,"stem":43},"Vite","\u002Fvite","4.vite",{"title":45,"path":46,"stem":47},"Nitro","\u002Fnitro","5.nitro",{"title":49,"path":50,"stem":51},"TypeScript","\u002Ftypescript","6.typescript",{"title":53,"path":54,"stem":55,"children":56,"icon":63},"Design system","\u002Fdesign-system","7.design-system\u002F1.index",[57,59],{"title":58,"path":54,"stem":55},"Overview",{"title":60,"path":61,"stem":62},"Classes and styles","\u002Fdesign-system\u002Fclasses","7.design-system\u002F2.classes","i-lucide-swatch-book",{"title":65,"path":66,"stem":67},"Package","\u002Fpackage","8.package",{"title":69,"path":70,"stem":71,"children":72,"icon":91},"Extending Doctor","\u002Fextending","9.extending\u002F1.index",[73,75,79,83,87],{"title":74,"path":70,"stem":71},"Write an extension",{"title":76,"path":77,"stem":78},"Visitors","\u002Fextending\u002Fvisitors","9.extending\u002F2.visitors",{"title":80,"path":81,"stem":82},"Ship with a library","\u002Fextending\u002Fshipping","9.extending\u002F3.shipping",{"title":84,"path":85,"stem":86},"Test a Rule","\u002Fextending\u002Ftesting","9.extending\u002F4.testing",{"title":88,"path":89,"stem":90},"Rule inputs","\u002Fextending\u002Frule-inputs","9.extending\u002F5.rule-inputs","i-lucide-puzzle",{"title":93,"path":94,"stem":95},"H3","\u002Fh3","9.h3",{"title":97,"path":98,"stem":99},"MCP","\u002Fmodel-context-protocol","9.model-context-protocol",{"title":101,"path":102,"stem":103},"Pinia","\u002Fpinia","9.pinia",{"id":105,"title":106,"body":107,"category":113,"description":379,"diagnosticCodes":380,"docsUrl":115,"extension":381,"fix":116,"framework":382,"meta":383,"navigation":384,"pack":117,"path":386,"recommendedReplacement":387,"ruleId":118,"seo":388,"severity":119,"source":120,"sourceUrl":121,"stem":389,"why":390,"__hash__":391},"rules\u002Fnuxt\u002Frules\u002Fpages\u002Fsingle-root-node.md","Give transitioned pages and layouts a single root node",{"type":108,"value":109,"toc":370},"minimark",[110,122,127,159,163,182,186,193,197,216,220,225,228,298,301,366],[111,112],"rule-metadata",{"category":113,"diagnosticCodes":114,"docsUrl":115,"fix":116,"pack":117,"ruleId":118,"severity":119,"source":120,"sourceUrl":121},"correctness","NUXT0100","https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fgetting-started\u002Ftransitions","suggestion","vite-doctor\u002Fnuxt","nuxt\u002Fpages\u002Fsingle-root-node","warn","src\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Fsingle-root-node.ts","https:\u002F\u002Fgithub.com\u002Fwords-with-agents\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Fsingle-root-node.ts",[123,124,126],"h2",{"id":125},"run-this-rule","Run this rule",[128,129,134],"pre",{"className":130,"code":131,"language":132,"meta":133,"style":133},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm nuxt doctor --rules nuxt\u002Fpages\u002Fsingle-root-node\n","bash","",[135,136,137],"code",{"__ignoreMap":133},[138,139,142,146,150,153,156],"span",{"class":140,"line":141},"line",1,[138,143,145],{"class":144},"sBMFI","pnpm",[138,147,149],{"class":148},"sfazB"," nuxt",[138,151,152],{"class":148}," doctor",[138,154,155],{"class":148}," --rules",[138,157,158],{"class":148}," nuxt\u002Fpages\u002Fsingle-root-node\n",[123,160,162],{"id":161},"why-it-matters","Why it matters",[164,165,166,167,170,171,173,174,177,178,181],"p",{},"Nuxt wraps pages in a ",[135,168,169],{},"\u003CTransition>"," when a page transition is on, and layouts when a layout transition is on. A ",[135,172,169],{}," can only animate a single element, so a page with several root nodes, or a text root, does not animate when you navigate to or from it. Vue keeps template comments in development, so a comment next to the root element also turns the page into a fragment there. Nuxt reports this in development as NUXT_E4004 for pages and NUXT_E4002 for layouts. Both are off by default (",[135,175,176],{},"app.pageTransition"," and ",[135,179,180],{},"app.layoutTransition"," default to false), so pages without a transition are not reported.",[123,183,185],{"id":184},"recommended-fix","Recommended fix",[164,187,188,189,192],{},"Wrap the template in a single root element, such as a ",[135,190,191],{},"\u003Cdiv>",", and move comments inside it.",[123,194,196],{"id":195},"useful-links","Useful links",[198,199,200,209],"ul",{},[201,202,203],"li",{},[204,205,208],"a",{"href":115,"rel":206},[207],"nofollow","Nuxt transitions",[201,210,211],{},[204,212,215],{"href":213,"rel":214},"https:\u002F\u002Fvuejs.org\u002Fguide\u002Fbuilt-ins\u002Ftransition.html",[207],"Vue Transition",[123,217,219],{"id":218},"example","Example",[221,222,224],"h3",{"id":223},"give-a-transitioned-page-one-root-element","Give a transitioned page one root element",[164,226,227],{},"Before",[128,229,233],{"className":230,"code":231,"language":232,"meta":133,"style":133},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C!-- nuxt.config.ts sets app: { pageTransition: { name: 'page' } } -->\n\u003Ctemplate>\n  \u003Ch1>Users\u003C\u002Fh1>\n  \u003CUserList \u002F>\n\u003C\u002Ftemplate>\n","vue",[135,234,235,241,255,278,289],{"__ignoreMap":133},[138,236,237],{"class":140,"line":141},[138,238,240],{"class":239},"sHwdD","\u003C!-- nuxt.config.ts sets app: { pageTransition: { name: 'page' } } -->\n",[138,242,244,248,252],{"class":140,"line":243},2,[138,245,247],{"class":246},"sMK4o","\u003C",[138,249,251],{"class":250},"swJcz","template",[138,253,254],{"class":246},">\n",[138,256,258,261,264,267,271,274,276],{"class":140,"line":257},3,[138,259,260],{"class":246},"  \u003C",[138,262,263],{"class":250},"h1",[138,265,266],{"class":246},">",[138,268,270],{"class":269},"sTEyZ","Users",[138,272,273],{"class":246},"\u003C\u002F",[138,275,263],{"class":250},[138,277,254],{"class":246},[138,279,281,283,286],{"class":140,"line":280},4,[138,282,260],{"class":246},[138,284,285],{"class":250},"UserList",[138,287,288],{"class":246}," \u002F>\n",[138,290,292,294,296],{"class":140,"line":291},5,[138,293,273],{"class":246},[138,295,251],{"class":250},[138,297,254],{"class":246},[164,299,300],{},"After",[128,302,304],{"className":230,"code":303,"language":232,"meta":133,"style":133},"\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Users\u003C\u002Fh1>\n    \u003CUserList \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[135,305,306,314,323,340,348,357],{"__ignoreMap":133},[138,307,308,310,312],{"class":140,"line":141},[138,309,247],{"class":246},[138,311,251],{"class":250},[138,313,254],{"class":246},[138,315,316,318,321],{"class":140,"line":243},[138,317,260],{"class":246},[138,319,320],{"class":250},"div",[138,322,254],{"class":246},[138,324,325,328,330,332,334,336,338],{"class":140,"line":257},[138,326,327],{"class":246},"    \u003C",[138,329,263],{"class":250},[138,331,266],{"class":246},[138,333,270],{"class":269},[138,335,273],{"class":246},[138,337,263],{"class":250},[138,339,254],{"class":246},[138,341,342,344,346],{"class":140,"line":280},[138,343,327],{"class":246},[138,345,285],{"class":250},[138,347,288],{"class":246},[138,349,350,353,355],{"class":140,"line":291},[138,351,352],{"class":246},"  \u003C\u002F",[138,354,320],{"class":250},[138,356,254],{"class":246},[138,358,360,362,364],{"class":140,"line":359},6,[138,361,273],{"class":246},[138,363,251],{"class":250},[138,365,254],{"class":246},[367,368,369],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":133,"searchDepth":243,"depth":243,"links":371},[372,373,374,375,376],{"id":125,"depth":243,"text":126},{"id":161,"depth":243,"text":162},{"id":184,"depth":243,"text":185},{"id":195,"depth":243,"text":196},{"id":218,"depth":243,"text":219,"children":377},[378],{"id":223,"depth":257,"text":224},"Finds pages and layouts with multiple roots, or a text or comment root, when a transition applies on a known route. Doctor checks the reachable `\u003CNuxtPage>` outlet, matched route metadata, and app defaults in Nuxt's precedence order. It checks only registered layouts it can associate with a `\u003CNuxtLayout>` outlet and a transition. A `v-if`\u002F`v-else-if`\u002F`v-else` chain counts as one root; runtime-dependent transitions and lone `\u003Cslot>` roots are not reported.",[114],"md","nuxt",{},{"title":385},"Page root nodes","\u002Fnuxt\u002Frules\u002Fpages\u002Fsingle-root-node","Wrap the template in a single root element, such as a `\u003Cdiv>`, and move comments inside it.",{"title":106,"description":379},"nuxt\u002Frules\u002Fpages\u002Fsingle-root-node","Nuxt wraps pages in a `\u003CTransition>` when a page transition is on, and layouts when a layout transition is on. A `\u003CTransition>` can only animate a single element, so a page with several root nodes, or a text root, does not animate when you navigate to or from it. Vue keeps template comments in development, so a comment next to the root element also turns the page into a fragment there. Nuxt reports this in development as NUXT_E4004 for pages and NUXT_E4002 for layouts. Both are off by default (`app.pageTransition` and `app.layoutTransition` default to false), so pages without a transition are not reported.","ByB-LYvnQGgtYge6bcE2ItQT5jyB6MZhf6oFaN_Y3jg",1796507769489,"e745db9b-2064-477e-b678-8c0a05edc39c"]