Show info about files/packages included with your rollup bundle
94
Build a Rollup plugin that analyzes bundle composition and provides detailed file-level breakdowns when requested. The plugin should help developers understand which individual files within packages contribute to bundle size.
The plugin must analyze bundles during the build process and provide a summary report showing package-level size information. The report should:
When detailed reporting is enabled, the plugin must show individual file information within each package:
The plugin should support configuration options to control its behavior:
The plugin must integrate properly with Rollup's build process:
@generates
/**
* Creates a bundle analyzer plugin for Rollup
* @param {Object} options - Configuration options
* @param {boolean} [options.details=false] - Enable detailed file-level breakdown
* @param {Function} [options.report] - Custom report function receiving analysis data
* @returns {Object} Rollup plugin object
*/
function bundleAnalyzer(options = {}) {
// Implementation
}
module.exports = bundleAnalyzer;Provides bundle size analysis and reporting capabilities for Rollup builds.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-rollup-plugin-sizesdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10