[{"data":1,"prerenderedAt":203},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintegrations\u002Fbuild-tools\u002Fnuxt":3},{"id":4,"title":5,"body":6,"description":183,"extension":184,"frontmatter":185,"heading":193,"meta":194,"navigation":196,"order":189,"path":197,"seo":198,"sitemap":199,"source":200,"stem":201,"__hash__":202},"docs\u002Fdocs\u002F5.x\u002Fintegrations\u002Fbuild-tools\u002Fnuxt.md","Nuxt module - Generate code from OpenAPI",{"type":7,"value":8,"toc":174},"minimark",[9,25,38,167],[10,11,12,16,17,20,21,24],"p",{},[13,14,15],"code",{},"kubb\u002Fnuxt"," generates code from your ",[13,18,19],{},"kubb.config.ts"," once, in the client build, which runs before the server build. It ships with ",[13,22,23],{},"kubb",".",[26,27,29,30,33,34,37],"blockquote",{"as":28},"important","The module works with the Vite, webpack, and Rspack builders, and skips ",[13,31,32],{},"nuxt dev",". Run ",[13,35,36],{},"kubb generate"," before you start the dev server.",[39,40,42,47,55,62,72,156,160],"steps",{"level":41},"2",[43,44,46],"h2",{"id":45},"install-kubb-and-your-plugins","Install Kubb and your plugins",[10,48,49,50,24],{},"Follow ",[51,52,54],"a",{"href":53},"\u002Fdocs\u002F5.x\u002Fintroduction\u002Finstallation","Installation",[43,56,58,59],{"id":57},"add-kubb-to-nuxtconfigts","Add Kubb to ",[13,60,61],{},"nuxt.config.ts",[10,63,64,65,67,68,71],{},"Pass one config object from your ",[13,66,19],{}," as ",[13,69,70],{},"config",", not an array or a function.",[73,74,78],"pre",{"language":75,"filename":61,"code":76,"class":77},"typescript","import config from '.\u002Fkubb.config'\n\nexport default defineNuxtConfig({\n  modules: [['kubb\u002Fnuxt', { config }]],\n})","highlights",[13,79,81,101,102,101,104,101,120,101,151],{"class":80},"language-typescript",[82,83,86,90,94,97],"span",{"class":84,"style":85},"line","display: inline",[82,87,89],{"style":88},"color:#d73a49;--hls-dark:#f97583","import ",[82,91,93],{"style":92},"color:#24292e;--hls-dark:#e1e4e8","config ",[82,95,96],{"style":88},"from ",[82,98,100],{"style":99},"color:#032f62;--hls-dark:#9ecbff","'.\u002Fkubb.config'","\n",[82,103],{"class":84,"style":85},[82,105,106,109,112,116],{"class":84,"style":85},[82,107,108],{"style":88},"export ",[82,110,111],{"style":88},"default ",[82,113,115],{"style":114},"color:#6f42c1;--hls-dark:#b392f0","defineNuxtConfig",[82,117,119],{"style":118},"color:#005cc5;--hls-dark:#79b8ff","({",[82,121,122,125,128,131,134,137,140,143,145,148],{"class":84,"style":85},[82,123,124],{"style":118},"  ",[82,126,127],{"style":118},"modules",[82,129,130],{"style":88},": ",[82,132,133],{"style":118},"[[",[82,135,136],{"style":99},"'kubb\u002Fnuxt'",[82,138,139],{"style":88},", ",[82,141,142],{"style":118},"{ ",[82,144,93],{"style":92},[82,146,147],{"style":118},"}]]",[82,149,150],{"style":88},",",[82,152,153],{"class":84,"style":85},[82,154,155],{"style":118},"})",[43,157,159],{"id":158},"run-the-build","Run the build",[10,161,162,163,166],{},"Run ",[13,164,165],{},"nuxt build",". If Kubb fails, the build fails.",[10,168,169,173],{},[51,170,172],{"href":171},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fbuild-tools#how-the-build-runs-kubb","How the build runs Kubb"," covers defaults, reports, and watch rebuilds.",{"title":175,"searchDepth":176,"depth":176,"links":177},"",5,[178,180,182],{"id":45,"depth":179,"text":46},2,{"id":57,"depth":179,"text":181},"Add Kubb to nuxt.config.ts",{"id":158,"depth":179,"text":159},"Add the kubb\u002Fnuxt module to nuxt.config.ts so every Nuxt build generates code from your API spec with the plugins in your kubb.config.ts.","md",{"layout":186,"title":5,"description":183,"outline":187,"order":189,"navigation":190},"doc",[179,188],3,13,{"title":191,"icon":192},"Nuxt","i-simple-icons-nuxt","Generate code from your API spec with Nuxt",{"layout":186,"outline":195},[179,188],{"title":191,"icon":192},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fbuild-tools\u002Fnuxt",{"title":5,"description":183},{"loc":197},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintegrations\u002Fbuild-tools\u002Fnuxt.md","docs\u002F5.x\u002Fintegrations\u002Fbuild-tools\u002Fnuxt","yPwIj_xAWtz4Q_ScY-PDlLE1eSIlNlmBUTy2Lm8GGS0",1795021322697]