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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bundle-advisor

v0.5.0

Published

A CLI tool to analyze JavaScript bundle stats and suggest performance optimizations.

Readme

bundle-advisor

AI-assisted JavaScript bundle optimization with actionable recommendations.

Note: Bundle Advisor is currently in beta. Please expect (and report) any bugs, inaccurate recommendations, or other issues you encounter.

Features

  • Multiple bundler support: Webpack stats.json, Vite/bundle-stats.json
  • Rule-based analysis: Identifies duplicate packages, large modules, and optimization opportunities
  • Actionable recommendations: Prioritized list of fixes with estimated impact
  • Developer-first: CLI tool for local and CI environments

Installation

pnpm add -D bundle-advisor

Usage

CLI

# Markdown output (default) - works with both Webpack and Vite/bundle-stats formats
bundle-advisor analyze --stats-file path/to/stats.json

Set the output format

# Markdown (default)
bundle-advisor analyze --stats-file path/to/stats.json

# JSON
bundle-advisor analyze --stats-file path/to/stats.json --reporters json

# HTML
bundle-advisor analyze --stats-file path/to/stats.json --reporters html

# Multiple
bundle-advisor analyze --stats-file path/to/stats.json --reporters json,html,markdown

Write to a directory

bundle-advisor analyze --stats-file path/to/stats.json --output-dir reports

The CLI will auto-detect the format (Webpack or bundle-stats).

Configuration

You can configure via the CLI arguments or create a bundle-advisor.config.json file in your project root.

{
  "reporters": { "json": true },
  "statsFile": "path/to/stats.json",
  "outputDir": "path/to/file.md",
  "rules": {
    "maxChunkSize": 256000,
    "maxModuleSize": 256000,
    "minLazyLoadThreshold": 102400
  }
}

Supported Options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | statsFile | string | stats.json| The path to the input bundle stats file to analyze. | | outputDir | string \| undefined | "bundle-advisor"| The directory to write report files. Writes to console when explicitly set to undefined. | | reporters.html | boolean | false| Determines if an HTML report is generated in <outputDir>/report.html | | reporters.json | boolean | false| Determines if a JSON report is generated in <outputDir>/report.json | | reporters.markdown | boolean | true| Determines if a markdown report is generated in <outputDir>/report.md | | rules.maxChunkSize | number | 250 * 1024 | Maximum chunk size in bytes | | rules.maxModuleSize | number | 200 * 1024 | Maximum module size in bytes | | rules.maxModuleSize | number | 100 * 1024 | Minimum size for lazy load candidates in bytes |

Notes:

  • All configuration options are optional
  • CLI arguments take precedence over config file settings.
  • All directory and file paths must be relative to process.cwd()