Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-stats-diff

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-stats-diff

CLI tool to report changes in bundle sizes across builds

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by2.06%
Maintainers
1
Weekly downloads
 
Created
Source

webpack-stats-diff

A command-line tool to report changes in bundle sizes across builds.

The problem

You just made changes to your webpack config or your source files and you want to know how bundle sizes were impacted.

The solution

Use this tool to see how much the total built file size has changed and see the breakdown for what files were added or removed as well as what files increased or decreased in size.

Installation & Usage

Install with npm install -g webpack-stats-diff

To compare your bundle sizes before and after, you'll need to configure webpack to save a stats file. This can be done by either adding a script to your package.json similar to build_stats: webpack mode=production --json > stats.json or by adding webpack-stats-plugin into your plugins list.

For example, to compare the bundle sizes between branches, you could save the master build stats to a file master.json and the branch build stats to my-branch.json and run

webpack-stats-diff master.json my-branch.json

terminal showing the result of running the command

Other Solutions

  • webpack-compare instead generates an HTML file to display the comparison, but it doesn't include totals or filtering options.

Keywords

FAQs

Package last updated on 21 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc