talira

Webpack Bundle Analyzer

A webpack plugin and CLI that shows what's in your bundles as an interactive, zoomable treemap

open sourceMITfree

Webpack Bundle Analyzer is a webpack plugin and command-line tool that draws the contents of your bundles as an interactive, zoomable treemap, so you can see which modules take up the most space, spot ones that got in by mistake and trim the bundle. It parses minified bundles to get the real size of each module, and shows stat, parsed, gzip, Brotli and Zstandard sizes. As a plugin it can serve the report from a local server, write a static HTML report or JSON, and as a CLI it reads a webpack stats file. It's maintained in the webpack organization on GitHub and installs from npm as a dev dependency.

Problems it solves

  • find out which modules make my webpack bundle so big
  • see the gzipped size of each dependency in my JavaScript bundle
  • generate a static HTML report of my bundle's contents in CI

Features

  • an interactive zoomable treemap of every bundle's modules
  • real module sizes from minified bundles
  • stat, parsed, gzip, Brotli and Zstandard sizes
  • server, static HTML or JSON reports, as a plugin or a CLI

Alternatives

The same job

These do what Webpack Bundle Analyzer does.

  1. webpack A bundler for javascript and friends
  2. webpack-node-externals Exclude node_modules from webpack bundles for the backend
  3. Vite Next Generation Frontend Tooling

Compare Webpack Bundle Analyzer with the top 3