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