Socket
Socket
Sign inDemoInstall

cmprs

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cmprs

Compares file sizes between two stats.json objects


Version published
Weekly downloads
4
Maintainers
1
Install size
119 kB
Created
Weekly downloads
 

Readme

Source

Webpack Compare

Fork of https://github.com/Southpaw17/webpack-compare

Install

npm install webpack-compare

Introduction

Ever wonder if a change you made, either to your build configuration or source, had a positive impact on the size of your Webpack bundles? webpack-compare aims to provide an easy-to-read comparison between a previous build and your latest build. Just use the StatsWriterPlugin to collect some info about your build and pass the stats.json into webpack-compare to see how your bundle sizes have changed over time.

Usage

Run your Webpack build to produce a stats.json from the StatsWriterPlugin. Store that somewhere so it doesn't get overwritten by a future build. Make whatever changes you want to test and run the Webpack build again to generate an updated stats.json. Then, run the cli to produce a report.

webpack-compare stats-old.json stats.json

Then open up compare/index.html in your favorite browser. If you want to change the output path just do the following:

webpack-compare stats-old.json stats.json -o /sweet/new/path

And you'll find your report at /sweet/new/path/index.html.

Keywords

FAQs

Last updated on 25 Feb 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc