[{"data":1,"prerenderedAt":513,"buildId":514},["ShallowReactive",2],{"diagnostic-content-VUE0052":3,"navigation_docs":412},{"id":4,"title":5,"body":6,"category":12,"code":402,"description":403,"docsUrl":13,"extension":404,"fix":405,"framework":84,"meta":406,"navigation":164,"pack":15,"path":407,"ruleId":16,"rulePath":17,"seo":408,"severity":18,"source":19,"sourceUrl":20,"stem":409,"why":410,"__hash__":411},"diagnostics\u002Fdiagnostics\u002FVUE0052.md","VUE0052: Render component roots where the HTML parser keeps them",{"type":7,"value":8,"toc":392},"minimark",[9,21,26,51,55,67,71,76,79,220,223,322,326,329,360,364,376,380,388],[10,11],"rule-metadata",{"category":12,"docsUrl":13,"fix":14,"pack":15,"ruleId":16,"rulePath":17,"severity":18,"source":19,"sourceUrl":20},"ssr","https:\u002F\u002Fvuejs.org\u002Fguide\u002Fscaling-up\u002Fssr.html#hydration-mismatch","no","vite-doctor\u002Fvue","vue\u002Fssr\u002Fno-invalid-root-nesting","\u002Fvue\u002Frules\u002Fssr\u002Fno-invalid-root-nesting","warn","src\u002Frule-packs\u002Fvue\u002Frules\u002Fvue\u002Fno-invalid-root-nesting.ts","https:\u002F\u002Fgithub.com\u002Fwords-with-agents\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fvue\u002Frules\u002Fvue\u002Fno-invalid-root-nesting.ts",[22,23,25],"h2",{"id":24},"why-it-happens","Why it happens",[27,28,29,30,34,35,38,39,42,43,46,47,50],"p",{},"Vue's compiler warns about invalid nesting inside one template, but not when the invalid child is another component's root. During SSR, the server sends the nesting as HTML and the browser's parser rewrites it: a ",[31,32,33],"code",{},"\u003Cdiv>"," closes the open ",[31,36,37],{},"\u003Cp>",", a ",[31,40,41],{},"\u003Ctr>"," gets an implied ",[31,44,45],{},"\u003Ctbody>",", a nested ",[31,48,49],{},"\u003Cform>"," is dropped. Vue then hydrates against DOM it did not render and logs \"Hydration node mismatch\" or \"Hydration children mismatch\", patching or recreating the subtree.",[22,52,54],{"id":53},"fix","Fix",[27,56,57,58,60,61,63,64,66],{},"Change the parent element to one that can contain the component's root, such as a ",[31,59,33],{}," instead of a ",[31,62,37],{},", add the missing ",[31,65,45],{},", or change the component's root element to one that is valid in that parent.",[22,68,70],{"id":69},"example","Example",[72,73,75],"h3",{"id":74},"wrap-block-content-in-a-block-element","Wrap block content in a block element",[27,77,78],{},"Before",[80,81,86],"pre",{"className":82,"code":83,"language":84,"meta":85,"style":85},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C!-- Card.vue -->\n\u003Ctemplate>\n  \u003Cdiv class=\"card\">\u003Cslot \u002F>\u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n\n\u003C!-- Page.vue -->\n\u003Ctemplate>\n  \u003Cp>\u003CCard>Hello\u003C\u002FCard>\u003C\u002Fp>\n\u003C\u002Ftemplate>\n","vue","",[31,87,88,97,111,149,159,166,172,181,211],{"__ignoreMap":85},[89,90,93],"span",{"class":91,"line":92},"line",1,[89,94,96],{"class":95},"sHwdD","\u003C!-- Card.vue -->\n",[89,98,100,104,108],{"class":91,"line":99},2,[89,101,103],{"class":102},"sMK4o","\u003C",[89,105,107],{"class":106},"swJcz","template",[89,109,110],{"class":102},">\n",[89,112,114,117,120,124,127,130,134,136,139,142,145,147],{"class":91,"line":113},3,[89,115,116],{"class":102},"  \u003C",[89,118,119],{"class":106},"div",[89,121,123],{"class":122},"spNyl"," class",[89,125,126],{"class":102},"=",[89,128,129],{"class":102},"\"",[89,131,133],{"class":132},"sfazB","card",[89,135,129],{"class":102},[89,137,138],{"class":102},">\u003C",[89,140,141],{"class":106},"slot",[89,143,144],{"class":102}," \u002F>\u003C\u002F",[89,146,119],{"class":106},[89,148,110],{"class":102},[89,150,152,155,157],{"class":91,"line":151},4,[89,153,154],{"class":102},"\u003C\u002F",[89,156,107],{"class":106},[89,158,110],{"class":102},[89,160,162],{"class":91,"line":161},5,[89,163,165],{"emptyLinePlaceholder":164},true,"\n",[89,167,169],{"class":91,"line":168},6,[89,170,171],{"class":95},"\u003C!-- Page.vue -->\n",[89,173,175,177,179],{"class":91,"line":174},7,[89,176,103],{"class":102},[89,178,107],{"class":106},[89,180,110],{"class":102},[89,182,184,186,188,190,193,196,200,202,204,207,209],{"class":91,"line":183},8,[89,185,116],{"class":102},[89,187,27],{"class":106},[89,189,138],{"class":102},[89,191,192],{"class":106},"Card",[89,194,195],{"class":102},">",[89,197,199],{"class":198},"sTEyZ","Hello",[89,201,154],{"class":102},[89,203,192],{"class":106},[89,205,206],{"class":102},">\u003C\u002F",[89,208,27],{"class":106},[89,210,110],{"class":102},[89,212,214,216,218],{"class":91,"line":213},9,[89,215,154],{"class":102},[89,217,107],{"class":106},[89,219,110],{"class":102},[27,221,222],{},"After",[80,224,226],{"className":82,"code":225,"language":84,"meta":85,"style":85},"\u003C!-- Card.vue -->\n\u003Ctemplate>\n  \u003Cdiv class=\"card\">\u003Cslot \u002F>\u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n\n\u003C!-- Page.vue -->\n\u003Ctemplate>\n  \u003Cdiv>\u003CCard>Hello\u003C\u002FCard>\u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[31,227,228,232,240,266,274,278,282,290,314],{"__ignoreMap":85},[89,229,230],{"class":91,"line":92},[89,231,96],{"class":95},[89,233,234,236,238],{"class":91,"line":99},[89,235,103],{"class":102},[89,237,107],{"class":106},[89,239,110],{"class":102},[89,241,242,244,246,248,250,252,254,256,258,260,262,264],{"class":91,"line":113},[89,243,116],{"class":102},[89,245,119],{"class":106},[89,247,123],{"class":122},[89,249,126],{"class":102},[89,251,129],{"class":102},[89,253,133],{"class":132},[89,255,129],{"class":102},[89,257,138],{"class":102},[89,259,141],{"class":106},[89,261,144],{"class":102},[89,263,119],{"class":106},[89,265,110],{"class":102},[89,267,268,270,272],{"class":91,"line":151},[89,269,154],{"class":102},[89,271,107],{"class":106},[89,273,110],{"class":102},[89,275,276],{"class":91,"line":161},[89,277,165],{"emptyLinePlaceholder":164},[89,279,280],{"class":91,"line":168},[89,281,171],{"class":95},[89,283,284,286,288],{"class":91,"line":174},[89,285,103],{"class":102},[89,287,107],{"class":106},[89,289,110],{"class":102},[89,291,292,294,296,298,300,302,304,306,308,310,312],{"class":91,"line":183},[89,293,116],{"class":102},[89,295,119],{"class":106},[89,297,138],{"class":102},[89,299,192],{"class":106},[89,301,195],{"class":102},[89,303,199],{"class":198},[89,305,154],{"class":102},[89,307,192],{"class":106},[89,309,206],{"class":102},[89,311,119],{"class":106},[89,313,110],{"class":102},[89,315,316,318,320],{"class":91,"line":213},[89,317,154],{"class":102},[89,319,107],{"class":106},[89,321,110],{"class":102},[22,323,325],{"id":324},"verify-the-fix","Verify the fix",[27,327,328],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[80,330,334],{"className":331,"code":332,"language":333,"meta":85,"style":85},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm vite-doctor . --framework vue --rules vue\u002Fssr\u002Fno-invalid-root-nesting\n","bash",[31,335,336],{"__ignoreMap":85},[89,337,338,342,345,348,351,354,357],{"class":91,"line":92},[89,339,341],{"class":340},"sBMFI","pnpm",[89,343,344],{"class":132}," vite-doctor",[89,346,347],{"class":132}," .",[89,349,350],{"class":132}," --framework",[89,352,353],{"class":132}," vue",[89,355,356],{"class":132}," --rules",[89,358,359],{"class":132}," vue\u002Fssr\u002Fno-invalid-root-nesting\n",[22,361,363],{"id":362},"useful-links","Useful links",[365,366,367],"ul",{},[368,369,370],"li",{},[371,372,375],"a",{"href":13,"rel":373},[374],"nofollow","Upstream docs",[22,377,379],{"id":378},"related-rule","Related rule",[365,381,382],{},[368,383,384],{},[371,385,386],{"href":17},[31,387,16],{},[389,390,391],"style",{},"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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":85,"searchDepth":99,"depth":99,"links":393},[394,395,396,399,400,401],{"id":24,"depth":99,"text":25},{"id":53,"depth":99,"text":54},{"id":69,"depth":99,"text":70,"children":397},[398],{"id":74,"depth":113,"text":75},{"id":324,"depth":99,"text":325},{"id":362,"depth":99,"text":363},{"id":378,"depth":99,"text":379},"VUE0052","Finds a component usage that sits directly inside an HTML element which cannot contain the component's root element, such as a component rendering `\u003Cdiv>` inside `\u003Cp>`, `\u003Ctr>` directly inside `\u003Ctable>`, `\u003Ca>` inside `\u003Ca>`, or `\u003Cform>` inside `\u003Cform>`. Doctor uses Vue's template compiler nesting table and reports only pairs it knows the HTML parser closes, drops, or moves. It checks every branch of a root `v-if` chain, and reports only usages resolved to one SFC whose parent and root tags are plain elements, not components, slots, `\u003Ctemplate>` wrappers, or `\u003Ccomponent :is>`. It requires SSR evidence and skips usages known to render only in the default slot of Nuxt's `\u003CClientOnly>` or through Nuxt's client- and server-mode component transforms. The fallback and placeholder slots still render on the server, and a direct file import does not apply Nuxt's component mode. When tracing callers, Doctor follows a literal `is` to a prepared Nuxt global only when it can rule out a local match. If the registration is missing from Nuxt's inventory or the local options cannot be read statically, Doctor does not follow that literal and can miss a mismatch inside the target. A `.global.vue` filename alone does not establish an SSR caller.","md","Change the parent element to one that can contain the component's root, such as a `\u003Cdiv>` instead of a `\u003Cp>`, add the missing `\u003Ctbody>`, or change the component's root element to one that is valid in that parent.",{},"\u002Fdiagnostics\u002Fvue0052",{"title":5,"description":403},"diagnostics\u002FVUE0052","Vue's compiler warns about invalid nesting inside one template, but not when the invalid child is another component's root. During SSR, the server sends the nesting as HTML and the browser's parser rewrites it: a `\u003Cdiv>` closes the open `\u003Cp>`, a `\u003Ctr>` gets an implied `\u003Ctbody>`, a nested `\u003Cform>` is dropped. Vue then hydrates against DOM it did not render and logs \"Hydration node mismatch\" or \"Hydration children mismatch\", patching or recreating the subtree.","maBIJONz3QmlFQFmQzQlTHd_OaR85Pch6HcHwj8rH0g",[413,441,445,449,453,457,461,473,477,501,505,509],{"title":414,"path":415,"stem":416,"children":417,"icon":440},"CLI","\u002Fcli","1.cli\u002F1.index",[418,420,424,428,432,436],{"title":419,"path":415,"stem":416},"Run Doctor",{"title":421,"path":422,"stem":423},"Reports","\u002Fcli\u002Freports","1.cli\u002F2.reports",{"title":425,"path":426,"stem":427},"Configuration","\u002Fcli\u002Fconfiguration","1.cli\u002F3.configuration",{"title":429,"path":430,"stem":431},"CI and changed files","\u002Fcli\u002Fci","1.cli\u002F4.ci",{"title":433,"path":434,"stem":435},"Workspaces","\u002Fcli\u002Fworkspaces","1.cli\u002F5.workspaces",{"title":437,"path":438,"stem":439},"Cache and speed","\u002Fcli\u002Fcache","1.cli\u002F6.cache","i-lucide-terminal",{"title":442,"path":443,"stem":444},"Nuxt","\u002Fnuxt","2.nuxt",{"title":446,"path":447,"stem":448},"Vue","\u002Fvue","3.vue",{"title":450,"path":451,"stem":452},"Vite","\u002Fvite","4.vite",{"title":454,"path":455,"stem":456},"Nitro","\u002Fnitro","5.nitro",{"title":458,"path":459,"stem":460},"TypeScript","\u002Ftypescript","6.typescript",{"title":462,"path":463,"stem":464,"children":465,"icon":472},"Design system","\u002Fdesign-system","7.design-system\u002F1.index",[466,468],{"title":467,"path":463,"stem":464},"Overview",{"title":469,"path":470,"stem":471},"Classes and styles","\u002Fdesign-system\u002Fclasses","7.design-system\u002F2.classes","i-lucide-swatch-book",{"title":474,"path":475,"stem":476},"Package","\u002Fpackage","8.package",{"title":478,"path":479,"stem":480,"children":481,"icon":500},"Extending Doctor","\u002Fextending","9.extending\u002F1.index",[482,484,488,492,496],{"title":483,"path":479,"stem":480},"Write an extension",{"title":485,"path":486,"stem":487},"Visitors","\u002Fextending\u002Fvisitors","9.extending\u002F2.visitors",{"title":489,"path":490,"stem":491},"Ship with a library","\u002Fextending\u002Fshipping","9.extending\u002F3.shipping",{"title":493,"path":494,"stem":495},"Test a Rule","\u002Fextending\u002Ftesting","9.extending\u002F4.testing",{"title":497,"path":498,"stem":499},"Rule inputs","\u002Fextending\u002Frule-inputs","9.extending\u002F5.rule-inputs","i-lucide-puzzle",{"title":502,"path":503,"stem":504},"H3","\u002Fh3","9.h3",{"title":506,"path":507,"stem":508},"MCP","\u002Fmodel-context-protocol","9.model-context-protocol",{"title":510,"path":511,"stem":512},"Pinia","\u002Fpinia","9.pinia",1796507778975,"e745db9b-2064-477e-b678-8c0a05edc39c"]