[{"data":1,"prerenderedAt":188},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintegrations\u002Fnuxt":3},{"id":4,"title":5,"body":6,"description":169,"extension":170,"frontmatter":171,"heading":5,"meta":179,"navigation":181,"order":175,"path":182,"seo":183,"sitemap":184,"source":185,"stem":186,"__hash__":187},"docs\u002Fdocs\u002F5.x\u002Fintegrations\u002Fnuxt.md","Generate code from your API spec with Nuxt",{"type":7,"value":8,"toc":162},"minimark",[9,19],[10,11,13,14,18],"blockquote",{"as":12},"important","This integration generates during builds only. Run ",[15,16,17],"code",{},"kubb generate"," before starting the development server.",[20,21,23,28,46,50,65,150],"steps",{"level":22},"2",[24,25,27],"h2",{"id":26},"install-kubb-and-your-output-plugins","Install Kubb and your output plugins",[29,30,31,32,37,38,41,42,45],"p",{},"Follow the ",[33,34,36],"a",{"href":35},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Finstallation","installation guide"," to add Kubb and the plugins your output needs. The integration ships with ",[15,39,40],{},"kubb"," as ",[15,43,44],{},"unplugin-kubb",".",[24,47,49],{"id":48},"configure-the-integration","Configure the integration",[29,51,52,53,56,57,60,61,64],{},"Import your shared ",[15,54,55],{},"kubb.config.ts"," and pass it to the integration. The ",[15,58,59],{},"config"," must be a single object, not the array or function forms ",[15,62,63],{},"defineConfig"," accepts. Run the build command of your tool to generate the files.",[66,67,72],"pre",{"language":68,"filename":69,"code":70,"class":71},"typescript","nuxt.config.ts","import config from '.\u002Fkubb.config'\n\nexport default defineNuxtConfig({\n  modules: [['kubb\u002Fnuxt', { config }]],\n})","highlights",[15,73,75,95,96,95,98,95,114,95,145],{"class":74},"language-typescript",[76,77,80,84,88,91],"span",{"class":78,"style":79},"line","display: inline",[76,81,83],{"style":82},"color:#d73a49;--hls-dark:#f97583","import ",[76,85,87],{"style":86},"color:#24292e;--hls-dark:#e1e4e8","config ",[76,89,90],{"style":82},"from ",[76,92,94],{"style":93},"color:#032f62;--hls-dark:#9ecbff","'.\u002Fkubb.config'","\n",[76,97],{"class":78,"style":79},[76,99,100,103,106,110],{"class":78,"style":79},[76,101,102],{"style":82},"export ",[76,104,105],{"style":82},"default ",[76,107,109],{"style":108},"color:#6f42c1;--hls-dark:#b392f0","defineNuxtConfig",[76,111,113],{"style":112},"color:#005cc5;--hls-dark:#79b8ff","({",[76,115,116,119,122,125,128,131,134,137,139,142],{"class":78,"style":79},[76,117,118],{"style":112},"  ",[76,120,121],{"style":112},"modules",[76,123,124],{"style":82},": ",[76,126,127],{"style":112},"[[",[76,129,130],{"style":93},"'kubb\u002Fnuxt'",[76,132,133],{"style":82},", ",[76,135,136],{"style":112},"{ ",[76,138,87],{"style":86},[76,140,141],{"style":112},"}]]",[76,143,144],{"style":82},",",[76,146,147],{"class":78,"style":79},[76,148,149],{"style":112},"})",[10,151,153,154,157,158,45],{"as":152},"note","Bundler integrations apply fewer defaults than the CLI: no Markdown parser, no reporters, and no ",[15,155,156],{},"output.postGenerate"," commands. Use the CLI when you need them. See ",[33,159,161],{"href":160},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#defaults","Defaults",{"title":163,"searchDepth":164,"depth":164,"links":165},"",5,[166,168],{"id":26,"depth":167,"text":27},2,{"id":48,"depth":167,"text":49},"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":172,"title":5,"description":169,"outline":173,"order":175,"navigation":176},"doc",[167,174],3,13,{"title":177,"icon":178},"Nuxt","i-simple-icons-nuxt",{"layout":172,"outline":180},[167,174],{"title":177,"icon":178},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fnuxt",{"title":5,"description":169},{"loc":182},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintegrations\u002Fnuxt.md","docs\u002F5.x\u002Fintegrations\u002Fnuxt","WkmXk-1tPYGYqCjIdfDl7OUo8Q9dBH9I-C6VgYjtDNo",1792931641174]