code: function configureBundleStats(config) {
    // Interactive tree map of the bundle.
    if (interactiveBundleStats)
      config.plugins.push(new BundleAnalyzerPlugin)
  
    // JSON file containing the bundle stats.
    if (bundleStats) {
      config.plugins.push(new StatsWriterPlugin({
        filename: 'bundle-stats.json',
        // Include everything.
        fields: null,
      }))
    }
  }
docs: Configure the stats generation.