BASE

webpack Bundle Analyzer

webpack Bundle Analyzer

Build / code quality tool · Free

Visualizes webpack build contents and packages' contributions to asset size, helping identify heavy dependencies.

Also known as: webpack-contrib/webpack-bundle-analyzer; webpack-bundle-analyzer; bundle-analyzer

Resource illustration: webpack Bundle Analyzer

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Find heavy dependencies in a webpack build
  • Open the module treemap and compare large dependencies' contributions

Example workflow

A possible workflow; this is not a report of hands-on testing.

Find heavy dependencies in a webpack build.

Before you start

  • A repository, package manifests, and configuration.
  • A compatible runtime and the target build command.

Steps

  1. Obtain bundle statistics for an actual production build.
  2. Open the module treemap and compare large dependencies' contributions.
  3. Add the workflow to scripts or CI with a clear report.

Check your result

  • A clean copy of the project reproduces the result.
  • Errors produce a nonzero exit code and clear diagnostics.

Choosing webpack Bundle Analyzer

Find heavy dependencies in a webpack build

Choose this when

  • Find heavy dependencies in a webpack build
  • Open the module treemap and compare large dependencies' contributions

Requirements

  • To analyze parsed/gzip sizes, save build files to disk and provide a sufficiently detailed stats.json. analyzerMode: static produces a report without a continuously running server.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.
  • If assets exist only in webpack-dev-server memory or are missing at the specified paths, the analyzer shows only stat. Calculated gzip is the compressed code size, not a measurement of a visitor's network download.

Frequently asked questions

What can you use for free in webpack Bundle Analyzer?

Code and local use under MIT.

What additional costs might arise with webpack Bundle Analyzer?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for webpack Bundle Analyzer?

MIT for the code; dependencies have separate licenses.

How do you get started with webpack Bundle Analyzer?

Obtain bundle statistics for an actual production build. Open the module treemap and compare large dependencies' contributions. Add the workflow to scripts or CI with a clear report.

How do stat, parsed, and gzip differ in the report?

stat comes from webpack stats and describes the input before transformations; parsed is the output after transformations, including minification; gzip is calculated by compressing the resulting bundles/modules. Compare the same size mode across builds.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • webpack Bundle Analyzer
  • build
  • Development

Sources

Other resources