> For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt.

# performance.printFileSize

- **类型：**

```ts
type PrintFileSizeOptions =
  | {
      /**
       * 是否输出所有静态资源文件的总体积
       */
      total?: boolean;
      /**
       * 是否输出每个静态资源文件的体积
       */
      detail?: boolean;
      /**
       * 是否输出 gzip 压缩后的体积
       */
      compressed?: boolean;
    }
  | boolean;
```

- **默认值：** `true`

是否在生产环境构建后输出所有静态资源文件的体积。

```bash
info    Production file sizes:

  File                                      Size         Gzipped
  dist/static/js/lib-react.09721b5c.js      152.6 kB     49.0 kB
  dist/html/main/index.html                 5.8 kB       2.5 kB
  dist/static/js/main.3568a38e.js           3.5 kB       1.4 kB
  dist/static/css/main.03221f72.css         1.4 kB       741 B
```

:::info
该配置项的使用方式与 Rsbuild 完全一致。详细信息请参考 [Rsbuild - performance.printFileSize](https://v2.rsbuild.dev/zh/config/performance/print-file-size)。
:::