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