npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webpack-stats-summary

v1.2.1

Published

Summarise Webpack stats

Downloads

20

Readme

webpack stats summary

generates a simple summary of chunk group sizes with optional chunk sizes

install it

$ yarn global add webpack-stats-summary

generate a webpack stats file

$ webpack --config webpack.prod.js --json > stats.json

dump a summary to the console

$ webpack-stats-summary
Chunk Group                    Disk KiB Gzip KiB
Total                            753.80   204.67
main                             509.11   149.99
i18n-en-messages-json              2.76     0.81
user-profile                     241.93    53.87

Errors and warnings are included by defaultif present in the stats file..

 Errors
[at-loader] ./src/something.ts:14:47
    TS6133: 'nogood' is declared but its value is never read.

 Warnings
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  js/vendors~main.25a57a75.js (379 KiB)
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (438 KiB)
      manifest.js
      js/vendors~main.25a57a75.js
      js/main.4561ef18.js

include chunk details

$ webpack-stats-summary -c
Chunk Group              Chunk                                               Disk KiB Gzip KiB
Total                                                                         2058.05   606.22

main                                                                           509.11   149.99
                         manifest.js                                             2.73     1.36
                         js/vendors~main.1a109532.js                           435.15   134.60
                         js/main.08d76402.js                                    71.23    14.02

i18n-en-messages-json                                                            2.76     0.81

user-profile                                                                   241.93    53.87
                         js/vendors~template-editor~user-profile.07ebc8a1.js    93.89    27.69
                         js/template-editor~user-profile.36b873dd.js            97.66    14.49
                         js/user-profile.49a1697b.js                            50.38    11.69

write summary as a markdown file

$ webpack-stats-summary -o markdown
$ cat webpack-stats-summary.md
| Chunk Group              | Disk KiB | Gzip KiB |
| ------------------------ | -------- | -------: |
| Total                    |   753.80 |   204.67 |
| main                     |   509.11 |   149.99 |
| i18n-en-messages-json    |     2.76 |     0.81 |
| user-profile             |   241.93 |    53.87 |

| Chunk Group | Disk KiB | Gzip KiB | | --------------------- | -------- | -------: | | Total | 753.80 | 204.67 | | main | 509.11 | 149.99 | | i18n-en-messages-json | 2.76 | 0.81 | | user-profile | 241.93 | 53.87 |

write summary as a json file

$ webpack-stats-summary -o json

set the location of the stats file

$ webpack-stats-summary -s ./myapp/stats.json

set the location of the build

$ webpack-stats-summary -b ./myapp/build