# webpack-compare-pretty

> Compares file sizes between two stats.json objects. Useful for comparing results of different configurations.

Latest version **1.0.0** (published 2017-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-compare-pretty
pnpm add webpack-compare-pretty
yarn add webpack-compare-pretty
bun add webpack-compare-pretty
```

Provides the command `webpack-compare`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-12-12 |
| First published | 2017-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jack Hanford |
| Maintainers | jackhanford |
| Keywords | webpack, compare, build |

## Links

- npm: https://www.npmjs.com/package/webpack-compare-pretty
- Repository: https://github.com/hanford/webpack-compare-pretty
- Homepage: https://github.com/hanford/webpack-compare-pretty#readme
- Issues: https://github.com/hanford/webpack-compare-pretty/issues
- npm.io page: https://npm.io/package/webpack-compare-pretty

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ~1.1.3
- [lodash](https://npm.io/package/lodash.md) ~4.17.4
- [commander](https://npm.io/package/commander.md) ~2.9.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-12-12
- 0.2.3 — 2017-12-12
- 0.2.2 — 2017-12-11
- 0.2.1 — 2017-12-11
- 0.2.0 — 2017-12-11

## README

# Webpack Compare

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

## Install
`npm i -g 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`.

---
_Source: https://npm.io/package/webpack-compare-pretty · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
