{"id":111283,"date":"2026-09-30T21:09:20","date_gmt":"2026-09-30T13:09:20","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/111283.html"},"modified":"2026-09-30T21:09:20","modified_gmt":"2026-09-30T13:09:20","slug":"%e7%8e%b0%e4%bb%a3%e5%89%8d%e7%ab%af%e6%9e%84%e5%bb%ba-chunk-%e5%88%86%e5%89%b2%e6%8b%93%e6%89%91%e4%bc%98%e5%8c%96%e4%b8%8e%e4%ba%a7%e7%89%a9%e5%a4%a7%e5%b0%8f%e9%a2%84%e7%ae%97%e6%b2%bb%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/111283.html","title":{"rendered":"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406"},"content":{"rendered":"<h2>\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260930130918-6abd09fedfa3e.webp\" alt=\"\u5c01\u9762\u4fe1\u606f\u56fe\" \/><\/p>\n<p>\u5728\u73b0\u4ee3\u5927\u524d\u7aef\u5de5\u7a0b\u5316\u4f53\u7cfb\u4e2d&#xff0c;\u9996\u5c4f\u52a0\u8f7d\u6027\u80fd&#xff08;LCP \/ Largest Contentful Paint&#xff09;\u4e0e\u7528\u6237\u8bbf\u95ee\u7559\u5b58\u7387\u76f4\u63a5\u6302\u94a9\u3002<\/p>\n<p>\u7136\u800c&#xff0c;\u5728\u6784\u5efa\u5de5\u5177&#xff08;Vite \/ Rollup \/ Webpack \/ Rspack&#xff09;\u7684\u4ee3\u7801\u5206\u5272&#xff08;Code Splitting&#xff09;\u914d\u7f6e\u4e0a&#xff0c;\u8bb8\u591a\u56e2\u961f\u7ecf\u5e38\u5728\u4e24\u4e2a\u6781\u7aef\u8bef\u533a\u4e4b\u95f4\u53cd\u590d\u6a2a\u8df3&#xff1a;<\/p>\n<li>\u6781\u7aef\u9677\u9631\u4e00&#xff1a;\u5de8\u77f3\u5355\u5305&#xff08;The Giant Monolith Chunk&#xff09;&#xff1a;\n<ul>\n<li>\u5f00\u53d1\u8005\u672a\u4f5c\u4efb\u4f55\u5206\u5272&#xff0c;\u5168\u7ad9\u6253\u5305\u51fa\u4e00\u4e2a\u9ad8\u8fbe $3.8\\\\text{MB}$ \u7684 index.js&#xff1b;<\/li>\n<li>\u7528\u6237\u9996\u6b21\u6253\u5f00\u9875\u9762\u65f6&#xff0c;\u6d4f\u89c8\u5668\u4e3b\u7ebf\u7a0b\u88ab\u957f\u8fbe\u6570\u79d2\u7684\u4e0b\u8f7d\u4e0e JS \u7f16\u8bd1\u6b7b\u9501&#xff0c;\u9996\u5c4f\u767d\u5c4f\u65f6\u95f4\u60e8\u4e0d\u5fcd\u7779&#xff1b;<\/li>\n<\/ul>\n<\/li>\n<li>\u6781\u7aef\u9677\u9631\u4e8c&#xff1a;\u7ec6\u788e\u788e\u7247\u5316\u96ea\u5d29&#xff08;Granular Chunk Explosion&#xff09;&#xff1a;\n<ul>\n<li>\u56e2\u961f\u77eb\u6789\u8fc7\u6b63&#xff0c;\u628a\u6bcf\u4e00\u4e2a\u7ec4\u4ef6\u3001\u6bcf\u4e00\u4e2a\u5fae\u5c0f\u5de5\u5177\u51fd\u6570\u90fd\u914d\u7f6e\u4e3a\u52a8\u6001 import()&#xff1b;<\/li>\n<li>\u7ed3\u679c\u5168\u7ad9\u6253\u5305\u51fa\u4e86 \u8d85\u8fc7 600 \u4e2a\u51e0\u767e\u5b57\u8282\u7684\u5fae\u578b JS \u788e\u7247&#xff01;<\/li>\n<li>\u5c3d\u7ba1\u5728 HTTP\/2 \u591a\u8def\u590d\u7528\u4e0b&#xff0c;\u6d4f\u89c8\u5668\u4f9d\u7136\u56e0\u5e9e\u5927\u7684\u5e76\u53d1\u8fde\u63a5\u5f00\u9500\u3001\u6a21\u5757\u4f9d\u8d56\u62d3\u6251\u9012\u5f52\u89e3\u6790\u7011\u5e03\u6d41&#xff08;Waterfalls&#xff09;\u800c\u9677\u5165\u957f\u8fbe 1.5 \u79d2\u7684\u4e8c\u6b21\u505c\u987f&#xff01;<\/li>\n<\/ul>\n<\/li>\n<p>\u6784\u5efa\u4e00\u5957**\u201c\u5206\u5c42\u6e10\u8fdb\u5f0f Chunk \u62d3\u6251\u5206\u5272\u67b6\u6784&#xff08;Layered Topology Chunking Strategy&#xff09;\u201d \u7ed3\u5408 \u201cCI\/CD \u81ea\u52a8\u5316\u5927\u5c0f\u9884\u7b97\u95e8\u7981&#xff08;Bundle Size Limit Guard&#xff09;\u201d**&#xff0c;\u662f\u73b0\u4ee3\u524d\u7aef\u5de5\u7a0b\u5b9e\u73b0\u9996\u5c4f\u6781\u901f\u79d2\u5f00\u7684\u6838\u5fc3\u538b\u8231\u77f3\u3002<\/p>\n<h4>\u5206\u5c42 Chunk \u62d3\u6251\u67b6\u6784\u6a21\u578b&#xff08;The 4-Tier Topology&#xff09;<\/h4>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 1. \u57fa\u7840\u4e0d\u53d8\u5c42 (vendor-framework: ~140KB \/ Gzip 42KB \/ \u7f13\u5b58\u547d\u4e2d\u7387 99%)        \u2502<br \/>\n\u2502    \u2514\u2500\u2500 \u5305\u542b: react, react-dom, &#064;tanstack\/react-query (\u51e0\u4e4e\u534a\u5e74\u4e0d\u53d1\u7248)         \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 2. \u8bbe\u8ba1\u7cfb\u7edf\u5c42 (vendor-design-system: ~180KB \/ Gzip 55KB \/ \u7f13\u5b58\u547d\u4e2d\u7387 90%)     \u2502<br \/>\n\u2502    \u2514\u2500\u2500 \u5305\u542b: &#064;company\/design-tokens, lucide-react, framer-motion             \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 3. \u5f02\u6b65\u91cd\u578b\u5f15\u64ce\u5c42 (vendor-heavy-engines: \u6309\u9700\u61d2\u52a0\u8f7d Lazy-loaded)             \u2502<br \/>\n\u2502    \u2514\u2500\u2500 \u5305\u542b: echarts, three.js, monaco-editor (\u4ec5\u5728\u8fdb\u5165\u5bf9\u5e94\u7279\u5b9a\u9875\u9762\u65f6\u4e0b\u8f7d)    \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 4. \u4e1a\u52a1\u7279\u6027\u5c42 (feature-pages: &lt; 45KB per page \/ \u9891\u7e41\u8fed\u4ee3\u53d1\u5e03)                \u2502<br \/>\n\u2502    \u2514\u2500\u2500 \u5305\u542b: Dashboard.tsx, Checkout.tsx (\u4f53\u79ef\u6781\u8f7b&#xff0c;\u4fee\u6539\u4ec5\u5bfc\u81f4\u672c\u6587\u4ef6\u7f13\u5b58\u5931\u6548) \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<p>\u62d3\u6251\u6838\u5fc3\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li>\u6bcf\u6b21\u4e1a\u52a1\u4ee3\u7801\u8fed\u4ee3\u53d1\u7248\u65f6&#xff0c;\u7528\u6237\u6d4f\u89c8\u5668\u4e2d\u5360\u5927\u5934\u7684 vendor-framework \u4e0e vendor-design-system 100% \u5f3a\u7f13\u5b58\u547d\u4e2d&#xff08;HTTP 304 \/ Disk Cache&#xff09;&#xff1b;<\/li>\n<li>\u7528\u6237\u4ec5\u9700\u4e0b\u8f7d\u51e0\u5341 KB \u7684\u8f7b\u91cf\u4e1a\u52a1\u5dee\u5f02\u4ee3\u7801&#xff0c;\u5b9e\u73b0\u771f\u6b63\u7684\u79d2\u7ea7\u5373\u65f6\u70ed\u52a0\u8f7d&#xff01;<\/li>\n<\/ul>\n<h4>\u7f16\u5199\u57fa\u4e8e Vite \/ Rollup \u7684\u7cbe\u7ec6\u5316 manualChunks \u914d\u7f6e<\/h4>\n<p>\/\/ vite.config.ts<br \/>\nimport { defineConfig } from &#039;vite&#039;;<br \/>\nimport react from &#039;&#064;vitejs\/plugin-react&#039;;<\/p>\n<p>export default defineConfig({<br \/>\n  plugins: [react()],<br \/>\n  build: {<br \/>\n    target: &#039;es2022&#039;,<br \/>\n    cssCodeSplit: true,<br \/>\n    sourcemap: false,<br \/>\n    chunkSizeWarningLimit: 500, \/\/ \u8d85\u8fc7 500KB \u62a5\u8b66<\/p>\n<p>    rollupOptions: {<br \/>\n      output: {<br \/>\n        \/\/ \u6838\u5fc3&#xff1a;\u56db\u5c42\u62d3\u6251\u5206\u5305\u7b56\u7565\u7b97\u6cd5<br \/>\n        manualChunks(id) {<br \/>\n          if (id.includes(&#039;node_modules&#039;)) {<br \/>\n            \/\/ 1. \u57fa\u7840\u4e0d\u53d8\u6846\u67b6\u5c42<br \/>\n            if (id.includes(&#039;react&#039;) || id.includes(&#039;scheduler&#039;) || id.includes(&#039;react-dom&#039;)) {<br \/>\n              return &#039;vendor-framework&#039;;<br \/>\n            }<\/p>\n<p>            \/\/ 2. \u8def\u7531\u4e0e\u72b6\u6001\u7ba1\u7406\u5c42<br \/>\n            if (id.includes(&#039;react-router&#039;) || id.includes(&#039;zustand&#039;) || id.includes(&#039;&#064;tanstack&#039;)) {<br \/>\n              return &#039;vendor-core-state&#039;;<br \/>\n            }<\/p>\n<p>            \/\/ 3. \u8bbe\u8ba1\u7cfb\u7edf\u4e0e\u52a8\u6548\u5e93<br \/>\n            if (id.includes(&#039;framer-motion&#039;) || id.includes(&#039;lucide-react&#039;) || id.includes(&#039;&#064;radix-ui&#039;)) {<br \/>\n              return &#039;vendor-ui-motion&#039;;<br \/>\n            }<\/p>\n<p>            \/\/ 4. \u91cd\u578b\u4e09\u65b9\u4f9d\u8d56\u5355\u72ec\u6210\u5305<br \/>\n            if (id.includes(&#039;echarts&#039;) || id.includes(&#039;zrender&#039;)) {<br \/>\n              return &#039;vendor-heavy-echarts&#039;;<br \/>\n            }<br \/>\n            if (id.includes(&#039;three&#039;)) {<br \/>\n              return &#039;vendor-heavy-three&#039;;<br \/>\n            }<\/p>\n<p>            \/\/ \u5176\u4f59\u957f\u5c3e\u4e09\u65b9\u5e93\u6253\u5305\u4e3a\u57fa\u7840\u516c\u5171\u4f9d\u8d56<br \/>\n            return &#039;vendor-common-libs&#039;;<br \/>\n          }<br \/>\n        },<\/p>\n<p>        \/\/ \u7edf\u4e00\u4ea7\u7269\u547d\u540d\u6a21\u5f0f<br \/>\n        chunkFileNames: &#039;assets\/js\/[name]-[hash].js&#039;,<br \/>\n        entryFileNames: &#039;assets\/js\/[name]-[hash].js&#039;,<br \/>\n        assetFileNames: &#039;assets\/[ext]\/[name]-[hash].[ext]&#039;,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n});<\/p>\n<h4>\u751f\u4ea7\u7ea7\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406\u95e8\u7981&#xff08;Size Limit CI Gate&#xff09;<\/h4>\n<p>\u4e3a\u4e86\u9632\u6b62\u67d0\u4e9b\u5f00\u53d1\u8005\u5728\u4e0d\u7ecf\u610f\u95f4 import \u4e86\u4e00\u4e2a\u9ad8\u8fbe 800KB \u7684\u91cd\u578b\u5305&#xff08;\u5982\u672a\u505a\u6309\u9700\u52a0\u8f7d\u7684\u5b8c\u6574 lodash \u6216 moment&#xff09;&#xff0c;\u6211\u4eec\u5728\u9879\u76ee\u4e2d\u914d\u7f6e Size-Limit \u81ea\u52a8\u5316\u7ea2\u7ebf&#xff1a;<\/p>\n<p>\/\/ .size-limit.json<br \/>\n[<br \/>\n  {<br \/>\n    &#034;path&#034;: &#034;dist\/assets\/js\/vendor-framework-*.js&#034;,<br \/>\n    &#034;limit&#034;: &#034;45 KB&#034;,<br \/>\n    &#034;brotli&#034;: true<br \/>\n  },<br \/>\n  {<br \/>\n    &#034;path&#034;: &#034;dist\/assets\/js\/vendor-ui-motion-*.js&#034;,<br \/>\n    &#034;limit&#034;: &#034;60 KB&#034;,<br \/>\n    &#034;brotli&#034;: true<br \/>\n  },<br \/>\n  {<br \/>\n    &#034;path&#034;: &#034;dist\/assets\/js\/index-*.js&#034;,<br \/>\n    &#034;limit&#034;: &#034;35 KB&#034;,<br \/>\n    &#034;brotli&#034;: true<br \/>\n  }<br \/>\n]<\/p>\n<h4>\u7f16\u5199\u81ea\u52a8\u5316\u5927\u5c0f\u5ba1\u8ba1\u4e0e PR \u62e6\u622a\u811a\u672c<\/h4>\n<p>\/\/ scripts\/bundle-budget-guard.ts<br \/>\nimport * as fs from &#039;fs&#039;;<br \/>\nimport * as path from &#039;path&#039;;<br \/>\nimport * as zlib from &#039;zlib&#039;;<br \/>\nimport { globSync } from &#039;glob&#039;;<\/p>\n<p>interface BudgetRule {<br \/>\n  pattern: string;<br \/>\n  maxGzipKb: number;<br \/>\n}<\/p>\n<p>const BUDGETS: BudgetRule[] &#061; [<br \/>\n  { pattern: &#039;dist\/assets\/js\/vendor-framework-*.js&#039;, maxGzipKb: 50 },<br \/>\n  { pattern: &#039;dist\/assets\/js\/vendor-ui-motion-*.js&#039;, maxGzipKb: 65 },<br \/>\n  { pattern: &#039;dist\/assets\/js\/index-*.js&#039;, maxGzipKb: 40 },<br \/>\n];<\/p>\n<p>export function executeBudgetCheck() {<br \/>\n  console.log(&#039;&#x1f4e6; [Bundle Budget] \u6b63\u5728\u5ba1\u8ba1\u524d\u7aef\u6784\u5efa\u4ea7\u7269\u7269\u7406\u5927\u5c0f\u4e0e Gzip \u9884\u7b97&#8230;\\\\n&#039;);<\/p>\n<p>  let hasBreach &#061; false;<\/p>\n<p>  for (const rule of BUDGETS) {<br \/>\n    const matchedFiles &#061; globSync(rule.pattern);<br \/>\n    if (matchedFiles.length &#061;&#061;&#061; 0) {<br \/>\n      console.warn(&#096;\u26a0\ufe0f \u672a\u5339\u914d\u5230\u4ea7\u7269\u6587\u4ef6: ${rule.pattern}&#096;);<br \/>\n      continue;<br \/>\n    }<\/p>\n<p>    for (const file of matchedFiles) {<br \/>\n      const rawContent &#061; fs.readFileSync(file);<br \/>\n      const gzippedContent &#061; zlib.gzipSync(rawContent);<br \/>\n      const gzipSizeKb &#061; parseFloat((gzippedContent.length \/ 1024).toFixed(2));<\/p>\n<p>      const isOverBudget &#061; gzipSizeKb &gt; rule.maxGzipKb;<br \/>\n      const statusIcon &#061; isOverBudget ? &#039;\u274c \u9884\u7b97\u8d85\u6807&#039; : &#039;\u2705 \u5408\u89c4\u8fbe\u6807&#039;;<\/p>\n<p>      console.log(&#096;${statusIcon} | \u6587\u4ef6: ${path.basename(file)} | Gzip: ${gzipSizeKb} KB (\u9884\u7b97\u4e0a\u9650: ${rule.maxGzipKb} KB)&#096;);<\/p>\n<p>      if (isOverBudget) {<br \/>\n        hasBreach &#061; true;<br \/>\n      }<br \/>\n    }<br \/>\n  }<\/p>\n<p>  if (hasBreach) {<br \/>\n    console.error(&#039;\\\\n&#x1f6a8; &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#039;);<br \/>\n    console.error(&#039;\u274c [CI \u95e8\u7981\u963b\u65ad] \u68c0\u6d4b\u5230\u4ea7\u7269\u4f53\u79ef\u8d85\u8fc7\u9884\u8bbe\u6027\u80fd\u9884\u7b97\u7ea2\u7ebf&#xff01;&#039;);<br \/>\n    console.error(&#039;&#x1f449; \u8bf7\u6392\u67e5\u662f\u5426\u5f15\u5165\u4e86\u672a\u7ecf Tree-shaking \u7684\u5927\u578b\u4f9d\u8d56\u5305&#xff01;&#039;);<br \/>\n    console.error(&#039;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;\\\\n&#039;);<br \/>\n    process.exit(1);<br \/>\n  } else {<br \/>\n    console.log(&#039;\\\\n&#x1f389; [CI \u6821\u9a8c\u901a\u8fc7] \u5168\u7ad9\u4ea7\u7269\u4e25\u683c\u7b26\u5408\u6027\u80fd\u9884\u7b97&#xff0c;\u9996\u5c4f\u79d2\u5f00\u6307\u6807\u7edd\u5bf9\u8fbe\u6807&#xff01;\\\\n&#039;);<br \/>\n  }<br \/>\n}<\/p>\n<p>executeBudgetCheck();<\/p>\n<h4>\u603b\u7ed3<\/h4>\n<p>\u4ee3\u7801\u5206\u5272\u7684\u6700\u9ad8\u5883\u754c&#xff0c;\u662f\u5728\u6d4f\u89c8\u5668 HTTP \u4f20\u8f93\u6548\u7387\u3001\u4f9d\u8d56\u7f13\u5b58\u590d\u7528\u7387\u4e0e\u4e3b\u7ebf\u7a0b\u89e3\u6790\u8017\u65f6\u4e4b\u95f4\u8fbe\u6210\u5b8c\u7f8e\u7684\u52a8\u6001\u5e73\u8861\u3002\u901a\u8fc7\u843d\u5730\u56db\u5c42\u62d3\u6251 Chunk \u5206\u5272\u89c4\u8303&#xff0c;\u5e76\u5728 CI \u6d41\u6c34\u7ebf\u4e2d\u7b51\u8d77\u4e25\u683c\u7684 Size-Limit \u6027\u80fd\u9884\u7b97\u7ea2\u7ebf&#xff0c;\u6211\u4eec\u5f7b\u5e95\u6d88\u706d\u4e86\u5de8\u77f3\u5355\u5305\u4e0e\u7ec6\u788e\u8bf7\u6c42\u96ea\u5d29&#xff0c;\u4e3a\u5927\u578b\u73b0\u4ee3 Web \u5e94\u7528\u7b51\u8d77\u4e86\u7ecf\u4e45\u4e0d\u8870\u7684\u9996\u5c4f\u79d2\u5f00\u6027\u80fd\u57fa\u77f3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406\u5728\u73b0\u4ee3\u5927\u524d\u7aef\u5de5\u7a0b\u5316\u4f53\u7cfb\u4e2d&#xff0c;\u9996\u5c4f\u52a0\u8f7d\u6027\u80fd&#xff08;LCP \/ Largest Contentful Paint&#xff09;\u4e0e\u7528\u6237\u8bbf\u95ee\u7559\u5b58\u7387\u76f4\u63a5\u6302\u94a9\u3002<br \/>\n\u7136\u800c&#xff0c;\u5728\u6784\u5efa\u5de5\u5177&#xff08;Vite \/ Rollup \/ Webpack \/ Rspack&#xff09;\u7684\u4ee3\u7801\u5206\u5272&#xff08;Code Splitting&#xff09;\u914d\u7f6e\u4e0a&#xff0c;\u8bb8\u591a\u56e2\u961f\u7ecf\u5e38\u5728\u4e24\u4e2a\u6781\u7aef\u8bef\u533a\u4e4b\u95f4\u53cd\u590d<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,573,594,50,87],"topic":[],"class_list":["post-111283","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-css","tag-web","tag-50","tag-87"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/111283.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406\u5728\u73b0\u4ee3\u5927\u524d\u7aef\u5de5\u7a0b\u5316\u4f53\u7cfb\u4e2d&#xff0c;\u9996\u5c4f\u52a0\u8f7d\u6027\u80fd&#xff08;LCP \/ Largest Contentful Paint&#xff09;\u4e0e\u7528\u6237\u8bbf\u95ee\u7559\u5b58\u7387\u76f4\u63a5\u6302\u94a9\u3002 \u7136\u800c&#xff0c;\u5728\u6784\u5efa\u5de5\u5177&#xff08;Vite \/ Rollup \/ Webpack \/ Rspack&#xff09;\u7684\u4ee3\u7801\u5206\u5272&#xff08;Code Splitting&#xff09;\u914d\u7f6e\u4e0a&#xff0c;\u8bb8\u591a\u56e2\u961f\u7ecf\u5e38\u5728\u4e24\u4e2a\u6781\u7aef\u8bef\u533a\u4e4b\u95f4\u53cd\u590d\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/111283.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-30T13:09:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260930130918-6abd09fedfa3e.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/111283.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/111283.html\",\"name\":\"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-30T13:09:20+00:00\",\"dateModified\":\"2026-09-30T13:09:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/111283.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/111283.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/111283.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/111283.html","og_locale":"zh_CN","og_type":"article","og_title":"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406\u5728\u73b0\u4ee3\u5927\u524d\u7aef\u5de5\u7a0b\u5316\u4f53\u7cfb\u4e2d&#xff0c;\u9996\u5c4f\u52a0\u8f7d\u6027\u80fd&#xff08;LCP \/ Largest Contentful Paint&#xff09;\u4e0e\u7528\u6237\u8bbf\u95ee\u7559\u5b58\u7387\u76f4\u63a5\u6302\u94a9\u3002 \u7136\u800c&#xff0c;\u5728\u6784\u5efa\u5de5\u5177&#xff08;Vite \/ Rollup \/ Webpack \/ Rspack&#xff09;\u7684\u4ee3\u7801\u5206\u5272&#xff08;Code Splitting&#xff09;\u914d\u7f6e\u4e0a&#xff0c;\u8bb8\u591a\u56e2\u961f\u7ecf\u5e38\u5728\u4e24\u4e2a\u6781\u7aef\u8bef\u533a\u4e4b\u95f4\u53cd\u590d","og_url":"https:\/\/www.wsisp.com\/helps\/111283.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-30T13:09:20+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260930130918-6abd09fedfa3e.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/111283.html","url":"https:\/\/www.wsisp.com\/helps\/111283.html","name":"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-30T13:09:20+00:00","dateModified":"2026-09-30T13:09:20+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/111283.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/111283.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/111283.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u73b0\u4ee3\u524d\u7aef\u6784\u5efa Chunk \u5206\u5272\u62d3\u6251\u4f18\u5316\u4e0e\u4ea7\u7269\u5927\u5c0f\u9884\u7b97\u6cbb\u7406"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/111283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=111283"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/111283\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=111283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=111283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=111283"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=111283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}