Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
Overall
score
98%
A Node.js utility that analyzes webpack bundle statistics and extracts comprehensive size metrics including stat, parsed, gzip, and brotli sizes.
@generates
/**
* Analyzes webpack bundle statistics and returns comprehensive size metrics.
*
* @param {string} statsFilePath - Path to the webpack stats JSON file
* @param {string} bundleDir - Directory containing the actual bundle files
* @param {Object} options - Configuration options
* @param {string} options.compressionAlgorithm - Compression algorithm to use ('gzip' or 'brotli')
* @returns {Promise<Object>} Analysis result with the following structure:
* {
* chartData: Array of asset objects, each containing:
* - label: asset name
* - statSize: original input size in bytes
* - parsedSize: output size after transformations in bytes
* - gzipSize: gzip compressed size in bytes (if calculated)
* }
* @throws {Error} If stats file cannot be read or parsed
*/
async function getBundleSizeMetrics(statsFilePath, bundleDir, options = {}) {
// IMPLEMENTATION HERE
}
module.exports = {
getBundleSizeMetrics,
};Provides bundle analysis and size calculation capabilities for webpack stats files.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-webpack-bundle-analyzerevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10