performance.bundleAnalyze

  • Type: Object | undefined

Used to enable the webpack-bundle-analyzer plugin to analyze the size of the output.

By default, Modern.js does not enable webpack-bundle-analyzer. When this feature is enabled, the default configuration is as follows:

const defaultConfig = {
  analyzerMode: 'static',
  openAnalyzer: false,
  // Distinguish by target names, such as `web`, `node`, etc.
  reportFilename: `report-${target}.html`,
};
INFO

The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - performance.bundleAnalyze.