trueWhether to print the file sizes after production build.
The default output log is as follows:
If you don't want to print any information, you can disable it by setting printFileSize to false:
You can customize the output format through the options.
booleantrueWhether to output the total size of all static assets.
If the current build only generates one static asset, the total size will not be printed.
booleantrueWhether to output the size of each static asset.
If you don't need to view the size of each static asset, you can set detail to false. In this case, only the total size will be output:
booleanfalse when output.target is node, otherwise trueWhether to output the gzip-compressed size of each static asset.
If you don't need to view the gzipped size, you can set compressed to false. This can save some gzip computation time for large projects:
This data is only for reference to the size after gzip compression. Rsbuild does not enable gzip compression for static assets. Usually, you need to enable gzip compression on the server side, for example, using the gzip module of nginx.
undefinedA filter function to determine which static assets to print.
If returned false, the static asset will be excluded and not included in the total size or detailed size.
For example, only output static assets larger than 10kB:
Or only output .js files larger than 10kB:
(asset) => /\.(?:map|LICENSE\.txt)$/.test(asset.name)A filter function to determine which static assets to exclude. If both include and exclude are set, exclude will take precedence.
Rsbuild defaults to excluding source map and license files, as these files do not affect page load performance.
For example, exclude .html files in addition to the default: