Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
Overall
score
98%
Create a utility that starts bundle analysis servers using the webpack-bundle-analyzer package. The utility should handle different port configuration scenarios for development teams working in shared environments.
Build a server manager that:
@generates
/**
* Starts a bundle analysis server
*
* @param {Object} stats - Webpack stats object
* @param {Object} options - Server configuration options
* @param {number|string} [options.analyzerPort] - Port number, 'auto', or 0 for automatic assignment
* @param {string} [options.analyzerMode='server'] - Analyzer mode
* @param {boolean} [options.openAnalyzer=false] - Whether to open browser automatically
* @returns {Promise<Object>} Object containing server instance and actual port used
*/
async function startAnalysisServer(stats, options = {}) {
// Implementation here
}
/**
* Stops a running analysis server
*
* @param {Object} server - Server object returned from startAnalysisServer
* @returns {Promise<void>}
*/
async function stopAnalysisServer(server) {
// Implementation here
}
module.exports = { startAnalysisServer, stopAnalysisServer };Provides bundle analysis capabilities with flexible port configuration
@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