1"use strict";(self.rspackChunkrspack_website=self.rspackChunkrspack_website||[]).push([["cm"],{oa(s,e,r){r.r(e);var n=r("i"),t=r("fj");function i(s){let e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",span:"span",strong:"strong",ul:"ul",...(0,t.R)(),...s.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.h1,{id:"产ç©åæ",children:[(0,n.jsx)(e.a,{className:"rp-header-anchor","aria-hidden":"true",href:"#产ç©åæ",children:"#"}),"产ç©åæ"]}),"\n",(0,n.jsxs)(e.h2,{id:"rsdoctor-ç产ç©åæ",children:[(0,n.jsx)(e.a,{className:"rp-header-anchor","aria-hidden":"true",href:"#rsdoctor-ç产ç©åæ",children:"#"}),"Rsdoctor ç产ç©åæ"]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.a,{href:"/zh/guide/diagnostics/use-rsdoctor.html",children:"Rsdoctor"})," æä¾äº ",(0,n.jsx)(e.code,{children:"Bundle Size"})," 模åï¼è¯¥æ¨¡å主è¦ç¨äºåæ Rspack æå»ºäº§ç©çä¿¡æ¯ï¼å
æ¬å½åç¼è¯äº§ç©çèµæºå¤§å°ãéå¤å
ãæ¨¡åå¼ç¨å
³ç³»çï¼"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:"äº§ç©æ¦è§"}),"ï¼å±ç¤ºäº§ç©æ»æ°ãåç±»åæä»¶æ°ç®ã大å°ä»¥åå æ¯ï¼ä»¥åéå¤å
åéå¤å
çå¼ç¨é¾ï¼"]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsxs)(e.strong,{children:["产ç©åæï¼",(0,n.jsx)(e.code,{children:"Bundle Analysis"}),"ï¼æ¨¡å"]}),"ï¼åææå»ºäº§ç©èµæºï¼",(0,n.jsx)(e.strong,{children:"Assets"}),"ï¼ä»¥åæå
å«ç ",(0,n.jsx)(e.strong,{children:"Modules"})," ç大å°å代ç ä¿¡æ¯ãå¨è¯¥æ¨¡åä¸ï¼å¯ä»¥æ¥ç Assets ä¸ ",(0,n.jsx)(e.strong,{children:"Module æå
åçå®é
代ç 大å°"}),"ï¼ä»¥å模åçåå§ä»£ç æ",(0,n.jsx)(e.strong,{children:"æå
åçä»£ç æ®µ"}),"以å",(0,n.jsx)(e.strong,{children:"模åå¼ç¨å
³ç³»"}),"ã"]}),"\n"]}),"\n",(0,n.jsx)("img",{src:"https://assets.rspack.rs/others/assets/rsdoctor/bundle-size-overall.png",width:"700px",style:{margin:"auto"}}),"\n",(0,n.jsxs)(e.p,{children:["ç¹å»",(0,n.jsx)(e.strong,{children:"å¯¼èªæ ãBundle Sizeã-> ãBundle Sizeãé项"}),"ï¼å³å¯æ¥ç Bundle åææ¥åãè¯¦ç»ææ¡£å¯æ¥ç",(0,n.jsx)(e.a,{href:"https://rsdoctor.rs/zh/guide/usage/bundle-size",rel:"noopener noreferrer",target:"_blank",children:"Bundle Size"})]}),"\n",(0,n.jsxs)(e.h3,{id:"éå¤å
æ²»ç",children:[(0,n.jsx)(e.a,{className:"rp-header-anchor","aria-hidden":"true",href:"#éå¤å
æ²»ç",children:"#"}),"éå¤å
æ²»ç"]}),"\n",(0,n.jsx)(e.p,{children:"å¨ç产æå»ºä¸ï¼ä¼åå
大尿¯ä¸ä¸ªéè¦ç¯èï¼å 为å®ç´æ¥å½±åå°å¨çº¿ç¨æ·ç使ç¨ä½éªã"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"æ£æ¥éå¤å
ï¼"}),"\n"]}),"\n",(0,n.jsx)(e.p,{children:"ä½ å¯ä»¥ä½¿ç¨ Rsdoctor æ¥æ£æµé¡¹ç®ä¸æ¯å¦åå¨éå¤çç¬¬ä¸æ¹ä¾èµå
ãRsdoctor å¨æå»ºè¿ç¨ä¸è¿è¡åæï¼æ¾å°éå¤ä¾èµå
并以å¯è§åæ¹å¼æ¾ç¤ºåºæ¥ï¼"}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsx)(e.img,{src:"https://assets.rspack.rs/others/assets/rsdoctor/overall-alerts.jpg",alt:""})}),"\n",(0,n.jsxs)(e.p,{children:["æ´å¤çç»è, å¯ä»¥æ¥ç ",(0,n.jsx)(e.a,{href:"https://rsdoctor.rs/zh/blog/topic/duplicate-pkg-problem",rel:"noopener noreferrer",target:"_blank",children:"Rsdoctor - éå¤å
æ²»ç"}),"."]}),"\n",(0,n.jsxs)(e.h2,{id:"bundle-stats--statoscope",children:[(0,n.jsx)(e.a,{className:"rp-header-anchor","aria-hidden":"true",href:"#bundle-stats--statoscope",children:"#"}),"bundle-stats & statoscope"]}),"\n",(0,n.jsxs)(e.p,{children:["ä½ ä¹å¯ä»¥çæ stats.json æä»¶ï¼ç¨å
¶ä»å
è§£æå·¥å
·è¿ä¸æ¥åæï¼å¦ ",(0,n.jsx)(e.a,{href:"https://github.com/relative-ci/bundle-stats",rel:"noopener noreferrer",target:"_blank",children:"bundle-stats"})," æ ",(0,n.jsx)(e.a,{href:"https://github.com/statoscope/statoscope",rel:"noopener noreferrer",target:"_blank",children:"statoscope"}),"ã"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki css-variables",style:{backgroundColor:"var(--shiki-background)",color:"var(--shiki-foreground)"},tabIndex:"0",lang:"sh",children:(0,n.jsx)(e.code,{children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"$"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:" rspack"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:" build"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:" --json"}),(0,n.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:" stats.json"})]})})})})]})}function o(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}={...(0,t.R)(),...s.components};return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(i,{...s})}):i(s)}o.__RSPRESS_PAGE_META={},o.__RSPRESS_PAGE_META["zh%2Fguide%2Fdiagnostics%2Fanalysis.mdx"]={toc:[{id:"r
1sdoctor-ç产ç©åæ",text:"Rsdoctor ç产ç©åæ",depth:2},{id:"éå¤å
æ²»ç",text:"éå¤å
æ²»ç",depth:3},{id:"bundle-stats--statoscope",text:"bundle-stats & statoscope",depth:2}],title:"产ç©åæ",headingTitle:"产ç©åæ",frontmatter:{description:"ä½¿ç¨ Rsdoctor çå·¥å
·åæ Rspack æå»ºäº§ç©ãéå¤ä¾èµå模åå¼ç¨å
³ç³»ã"}},r.d(e,{default:()=>o})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.