[{"data":1,"prerenderedAt":165},["ShallowReactive",2],{"blog-zh-Hant-prerendering-nuxt-without-a-server":3},{"doc":4,"fallback":155},{"id":5,"title":6,"body":7,"cover":149,"date":150,"description":151,"draft":152,"extension":153,"meta":154,"navigation":155,"path":156,"raw":152,"seo":157,"stem":158,"summary":159,"tags":160,"__hash__":164},"blog_en\u002Fen\u002Fblog\u002Fprerendering-nuxt-without-a-server.md","Prerendering Nuxt without accidentally shipping a server",{"type":8,"value":9,"toc":145},"minimark",[10,19,24,27,63,66,70,73,135,141],[11,12,13,14,18],"p",{},"The failure mode is quiet. ",[15,16,17],"code",{},"nuxi generate"," exits zero, the deploy succeeds, and\nthe site works. Months later you notice the host is invoking a function on every\nrequest, because the preset emitted a server rather than a directory of HTML.",[20,21,23],"h2",{"id":22},"check-the-output-not-the-log","Check the output, not the log",[11,25,26],{},"The only reliable check is the filesystem:",[28,29,34],"pre",{"className":30,"code":31,"language":32,"meta":33,"style":33},"language-bash shiki shiki-themes github-light github-dark","find .output\u002Fpublic -name \"index.html\" | sort\n","bash","",[15,35,36],{"__ignoreMap":33},[37,38,41,45,49,53,56,60],"span",{"class":39,"line":40},"line",1,[37,42,44],{"class":43},"sScJk","find",[37,46,48],{"class":47},"sZZnC"," .output\u002Fpublic",[37,50,52],{"class":51},"sj4cs"," -name",[37,54,55],{"class":47}," \"index.html\"",[37,57,59],{"class":58},"szBVR"," |",[37,61,62],{"class":43}," sort\n",[11,64,65],{},"Every route in the site map should appear. If a route is missing, it is being\nrendered on demand.",[20,67,69],{"id":68},"fail-the-build-instead","Fail the build instead",[11,71,72],{},"Prerender errors should stop the pipeline rather than degrade quietly:",[28,74,78],{"className":75,"code":76,"language":77,"meta":33,"style":33},"language-ts shiki shiki-themes github-light github-dark","nitro: {\n  prerender: {\n    crawlLinks: true,\n    failOnError: true\n  }\n}\n","ts",[15,79,80,89,97,112,123,129],{"__ignoreMap":33},[37,81,82,85],{"class":39,"line":40},[37,83,84],{"class":43},"nitro",[37,86,88],{"class":87},"sVt8B",": {\n",[37,90,92,95],{"class":39,"line":91},2,[37,93,94],{"class":43},"  prerender",[37,96,88],{"class":87},[37,98,100,103,106,109],{"class":39,"line":99},3,[37,101,102],{"class":43},"    crawlLinks",[37,104,105],{"class":87},": ",[37,107,108],{"class":51},"true",[37,110,111],{"class":87},",\n",[37,113,115,118,120],{"class":39,"line":114},4,[37,116,117],{"class":43},"    failOnError",[37,119,105],{"class":87},[37,121,122],{"class":51},"true\n",[37,124,126],{"class":39,"line":125},5,[37,127,128],{"class":87},"  }\n",[37,130,132],{"class":39,"line":131},6,[37,133,134],{"class":87},"}\n",[11,136,137,140],{},[15,138,139],{},"failOnError"," is the important half. Without it a route that throws during\nprerender is skipped and the deploy proceeds with a hole in it.",[142,143,144],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}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 .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":33,"searchDepth":91,"depth":91,"links":146},[147,148],{"id":22,"depth":91,"text":23},{"id":68,"depth":91,"text":69},"\u002Fimg\u002Fplaceholder.svg","2026-07-14","The failure mode is quiet. nuxi generate exits zero, the deploy succeeds, and\nthe site works. Months later you notice the host is invoking a function on every\nrequest, because the preset emitted a server rather than a directory of HTML.",false,"md",{},true,"\u002Fen\u002Fblog\u002Fprerendering-nuxt-without-a-server",{"title":6,"description":151},"en\u002Fblog\u002Fprerendering-nuxt-without-a-server","A misconfigured preset turns nuxi generate into SSR functions. Here is how to catch it before deploying.",[161,162,163],"nuxt","static","ci","PUJfJpBXfZoUHwDuU2s4ZMjtp3yd4K02erWnZ39uUyk",1788344195298]