performance.profile

  • Type: boolean
  • Default: false

Whether to capture timing information for each module, the same as the profile config of Rspack.

When enabled:

  • Rsbuild will automatically generate a dist/stats.json file through bundle analyzer.
  • Rspack will include build-time information when generating stats.json or other statistics files.

Example

export default {
  performance: {
    profile: true,
  },
};

When enabled, Rspack generates a JSON file with statistics about modules, including timing information for each module.

Guide

Please refer to the Build profiling page for more methods to analyze build performance.