webpack/webpack-bundle-analyzer ? reverse-engineered prompt

Reverse engineered prompt

Build me a webpack bundle analyzer that lets me see what is actually inside my build in a clear interactive treemap view.

I want to be able to use it as a webpack plugin and also from the command line, so it can either start a local report page, save a static HTML report, or export JSON for later use. The report should break down bundle contents in a way that makes it easy to spot big modules, unexpected files, and where the size is really coming from. It should work even with minified bundles, and show both raw size and compressed size, including gzip and brotli, maybe zstd too if that fits.

Make it feel polished and easy to use, with the report opening nicely in the browser by default, and give me sensible defaults but let me customize the title, output file, host, and port. If you need current webpack or Node docs to make it work cleanly, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab