CC 4.0 License
The content of this section is derived from the content of the following links and is subject to the CC BY 4.0 license.
The following contents can be assumed to be the result of modifications and deletions based on the original contents if not specifically stated.
Performance
performance configures Rspack's performance hint mechanism, helping you identify oversized outputs during the build.
It compares asset sizes and entrypoint total sizes against thresholds to decide whether hints should be emitted, and hints controls the hint level (warning / error / disabled).
You can define budget thresholds with maxAssetSize and maxEntrypointSize, and use assetFilter to exclude files that should not be counted, so hints better match your real performance goals.
performance
- Type:
false | object
Set performance to false to disable the performance hints:
performance.assetFilter
- Type:
(assetFilename: string) => boolean
Used to filter which assets are included in performance hint calculations. Files returning true are included, and files returning false are ignored.
Ignore CSS files when calculating performance hints:
performance.hints
- Type:
false | 'error' | 'warning' - Default:production mode is
warning, development mode isfalse
Controls whether performance hints are enabled and which level to use:
false: Disable performance hints'warning': Emit hints as warnings'error': Emit hints as errors, which fails the build
Treat performance hints as build errors:
performance.maxAssetSize
- Type:
number - Default:
250000
Sets the size threshold for a single asset (in bytes). Rspack emits a performance hint when an asset exceeds this value.
Lower the single asset size limit to catch oversized files earlier:
performance.maxEntrypointSize
- Type:
number - Default:
250000
Sets the total size threshold for an entrypoint (in bytes). Entrypoint total size means the total size needed for the initial load of that entry. Rspack emits a performance hint when the entrypoint total size exceeds this value.
For example, set the entrypoint size threshold to 500 KB:

