[{"data":1,"prerenderedAt":396},["ShallowReactive",2],{"navigation_docs":3,"diagnostic-content-NUXT0086":48},[4,8,12,16,20,24,28,32,36,40,44],{"title":5,"path":6,"stem":7},"CLI","\u002Fcli","1.cli",{"title":9,"path":10,"stem":11},"Nuxt","\u002Fnuxt","2.nuxt",{"title":13,"path":14,"stem":15},"Vue","\u002Fvue","3.vue",{"title":17,"path":18,"stem":19},"Vite","\u002Fvite","4.vite",{"title":21,"path":22,"stem":23},"Nitro","\u002Fnitro","5.nitro",{"title":25,"path":26,"stem":27},"TypeScript","\u002Ftypescript","6.typescript",{"title":29,"path":30,"stem":31},"shadcn","\u002Fshadcn","7.shadcn",{"title":33,"path":34,"stem":35},"Package","\u002Fpackage","8.package",{"title":37,"path":38,"stem":39},"Extending Doctor","\u002Fextending","9.extending",{"title":41,"path":42,"stem":43},"MCP","\u002Fmcp","9.mcp",{"title":45,"path":46,"stem":47},"Pinia","\u002Fpinia","9.pinia",{"id":49,"title":50,"body":51,"category":57,"code":384,"description":385,"docsUrl":58,"extension":386,"fix":387,"framework":388,"meta":389,"navigation":390,"pack":60,"path":391,"ruleId":61,"rulePath":62,"seo":392,"severity":63,"source":64,"sourceUrl":65,"stem":393,"why":394,"__hash__":395},"diagnostics\u002Fdiagnostics\u002FNUXT0086.md","NUXT0086: Give ClientOnly a server fallback",{"type":52,"value":53,"toc":374},"minimark",[54,66,71,84,88,97,101,106,109,195,198,304,308,311,342,346,358,362,370],[55,56],"rule-metadata",{"category":57,"docsUrl":58,"fix":59,"pack":60,"ruleId":61,"rulePath":62,"severity":63,"source":64,"sourceUrl":65},"hydration","https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fapi\u002Fcomponents\u002Fclient-only","suggestion","vite-doctor\u002Fnuxt","nuxt\u002Fhydration\u002Frequire-clientonly-fallback","\u002Fnuxt\u002Frules\u002Fhydration\u002Frequire-clientonly-fallback","info","src\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Frequire-client-only-fallback.ts","https:\u002F\u002Fgithub.com\u002Fonmax\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Frequire-client-only-fallback.ts",[67,68,70],"h2",{"id":69},"why-it-happens","Why it happens",[72,73,74,75,79,80,83],"p",{},"On the server, and until the component mounts, ",[76,77,78],"code",{},"\u003CClientOnly>"," renders only its fallback. Without a #fallback slot or a fallback, placeholder or fallback-tag prop that is an empty ",[76,81,82],{},"\u003Cspan>",", so the client-only content appears after hydration and pushes the surrounding layout.",[67,85,87],{"id":86},"fix","Fix",[72,89,90,91,93,94,96],{},"Add a #fallback slot with a placeholder of the same size, such as a skeleton, or set fallback-tag with classes that reserve the space. Prefer server-rendered markup when the content does not need the browser. Doctor skips ",[76,92,78],{}," wrappers whose only children are Teleport or overlay components such as modals, dialogs, drawers and toasts, and ",[76,95,78],{}," with a v-bind object, because those can pass a fallback Doctor cannot see. This Rule is opinionated, so it is only in the Strict Preset.",[67,98,100],{"id":99},"example","Example",[102,103,105],"h3",{"id":104},"reserve-the-space-with-a-fallback","Reserve the space with a fallback",[72,107,108],{},"Before",[110,111,116],"pre",{"className":112,"code":113,"language":114,"meta":115,"style":115},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Ctemplate>\n  \u003CClientOnly>\n    \u003CSalesChart :data=\"data\" \u002F>\n  \u003C\u002FClientOnly>\n\u003C\u002Ftemplate>\n","vue","",[76,117,118,134,145,175,185],{"__ignoreMap":115},[119,120,123,127,131],"span",{"class":121,"line":122},"line",1,[119,124,126],{"class":125},"sMK4o","\u003C",[119,128,130],{"class":129},"swJcz","template",[119,132,133],{"class":125},">\n",[119,135,137,140,143],{"class":121,"line":136},2,[119,138,139],{"class":125},"  \u003C",[119,141,142],{"class":129},"ClientOnly",[119,144,133],{"class":125},[119,146,148,151,154,157,161,164,167,170,172],{"class":121,"line":147},3,[119,149,150],{"class":125},"    \u003C",[119,152,153],{"class":129},"SalesChart",[119,155,156],{"class":125}," :",[119,158,160],{"class":159},"spNyl","data",[119,162,163],{"class":125},"=",[119,165,166],{"class":125},"\"",[119,168,160],{"class":169},"sTEyZ",[119,171,166],{"class":125},[119,173,174],{"class":125}," \u002F>\n",[119,176,178,181,183],{"class":121,"line":177},4,[119,179,180],{"class":125},"  \u003C\u002F",[119,182,142],{"class":129},[119,184,133],{"class":125},[119,186,188,191,193],{"class":121,"line":187},5,[119,189,190],{"class":125},"\u003C\u002F",[119,192,130],{"class":129},[119,194,133],{"class":125},[72,196,197],{},"After",[110,199,201],{"className":112,"code":200,"language":114,"meta":115,"style":115},"\u003Ctemplate>\n  \u003CClientOnly>\n    \u003CSalesChart :data=\"data\" \u002F>\n    \u003Ctemplate #fallback>\n      \u003CUSkeleton class=\"h-80 w-full\" \u002F>\n    \u003C\u002Ftemplate>\n  \u003C\u002FClientOnly>\n\u003C\u002Ftemplate>\n",[76,202,203,211,219,239,253,276,286,295],{"__ignoreMap":115},[119,204,205,207,209],{"class":121,"line":122},[119,206,126],{"class":125},[119,208,130],{"class":129},[119,210,133],{"class":125},[119,212,213,215,217],{"class":121,"line":136},[119,214,139],{"class":125},[119,216,142],{"class":129},[119,218,133],{"class":125},[119,220,221,223,225,227,229,231,233,235,237],{"class":121,"line":147},[119,222,150],{"class":125},[119,224,153],{"class":129},[119,226,156],{"class":125},[119,228,160],{"class":159},[119,230,163],{"class":125},[119,232,166],{"class":125},[119,234,160],{"class":169},[119,236,166],{"class":125},[119,238,174],{"class":125},[119,240,241,243,245,248,251],{"class":121,"line":177},[119,242,150],{"class":125},[119,244,130],{"class":129},[119,246,247],{"class":125}," #",[119,249,250],{"class":159},"fallback",[119,252,133],{"class":125},[119,254,255,258,261,264,266,268,272,274],{"class":121,"line":187},[119,256,257],{"class":125},"      \u003C",[119,259,260],{"class":129},"USkeleton",[119,262,263],{"class":159}," class",[119,265,163],{"class":125},[119,267,166],{"class":125},[119,269,271],{"class":270},"sfazB","h-80 w-full",[119,273,166],{"class":125},[119,275,174],{"class":125},[119,277,279,282,284],{"class":121,"line":278},6,[119,280,281],{"class":125},"    \u003C\u002F",[119,283,130],{"class":129},[119,285,133],{"class":125},[119,287,289,291,293],{"class":121,"line":288},7,[119,290,180],{"class":125},[119,292,142],{"class":129},[119,294,133],{"class":125},[119,296,298,300,302],{"class":121,"line":297},8,[119,299,190],{"class":125},[119,301,130],{"class":129},[119,303,133],{"class":125},[67,305,307],{"id":306},"verify-the-fix","Verify the fix",[72,309,310],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[110,312,316],{"className":313,"code":314,"language":315,"meta":115,"style":115},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm nuxt doctor --extends auto,nuxt\u002Fstrict --rules nuxt\u002Fhydration\u002Frequire-clientonly-fallback\n","bash",[76,317,318],{"__ignoreMap":115},[119,319,320,324,327,330,333,336,339],{"class":121,"line":122},[119,321,323],{"class":322},"sBMFI","pnpm",[119,325,326],{"class":270}," nuxt",[119,328,329],{"class":270}," doctor",[119,331,332],{"class":270}," --extends",[119,334,335],{"class":270}," auto,nuxt\u002Fstrict",[119,337,338],{"class":270}," --rules",[119,340,341],{"class":270}," nuxt\u002Fhydration\u002Frequire-clientonly-fallback\n",[67,343,345],{"id":344},"useful-links","Useful links",[347,348,349],"ul",{},[350,351,352],"li",{},[353,354,357],"a",{"href":58,"rel":355},[356],"nofollow","Upstream docs",[67,359,361],{"id":360},"related-rule","Related rule",[347,363,364],{},[350,365,366],{},[353,367,368],{"href":62},[76,369,61],{},[371,372,373],"style",{},"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 .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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":115,"searchDepth":136,"depth":136,"links":375},[376,377,378,381,382,383],{"id":69,"depth":136,"text":70},{"id":86,"depth":136,"text":87},{"id":99,"depth":136,"text":100,"children":379},[380],{"id":104,"depth":147,"text":105},{"id":306,"depth":136,"text":307},{"id":344,"depth":136,"text":345},{"id":360,"depth":136,"text":361},"NUXT0086","Finds \u003CClientOnly> components without a server fallback, which render an empty element on the server and shift the layout once their content mounts.","md","Add a #fallback slot with a placeholder of the same size, such as a skeleton, or set fallback-tag with classes that reserve the space. Prefer server-rendered markup when the content does not need the browser. Doctor skips \u003CClientOnly> wrappers whose only children are Teleport or overlay components such as modals, dialogs, drawers and toasts, and \u003CClientOnly> with a v-bind object, because those can pass a fallback Doctor cannot see. This Rule is opinionated, so it is only in the Strict Preset.","nuxt",{},true,"\u002Fdiagnostics\u002Fnuxt0086",{"title":50,"description":385},"diagnostics\u002FNUXT0086","On the server, and until the component mounts, \u003CClientOnly> renders only its fallback. Without a #fallback slot or a fallback, placeholder or fallback-tag prop that is an empty \u003Cspan>, so the client-only content appears after hydration and pushes the surrounding layout.","xu5Z7TKbUqZiW6VSwLbjfbdSa_o-PZaj6hxs2x4TCkE",1795268824489]