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

oxphobia

v0.0.2

Published

Calculate minified & gzipped bundle size via JSDelivr + Oxc (Parser/Minifier)

Readme

📦 Oxphobia

Oxphobia is an ultra-fast JavaScript bundle size calculator powered by Oxc (The Oxide JavaScript Tools).

By leveraging the Rust-based oxc-parser and oxc-minify, it performs high-speed dependency analysis and minification to instantly measure the "Minified + Gzipped" size of npm packages or local projects.

✨ Features

  • 🚀 Blazing Fast: Powered by the Rust-based Oxc toolchain for incredibly quick parsing and compression.
  • ☁️ npm Package Support: Recursively fetches and calculates the size of specified packages via jsDelivr .
  • 📂 Local Project Support: Run it at your project root to automatically detect entry points and estimate the total size including dependencies.
  • 🌳 Simple Tree-Shaking: Analyzes conditional branches based on process.env.NODE_ENV to exclude unnecessary code from the bundle.

📦 Installation

You can run it directly via npx or install it globally.

# Run directly
npx oxphobia [package-name]
pnpm dlx oxphobia [package-name]
yarn dlx oxphobia [package-name]
# or
dx npm:oxphobia [package-name]
# or
bunx oxphobia [package-name]

Or install globally:

npm install -g oxphobia

🚀 Usage

1. Measure npm package size

Specify a package name to fetch sources from the CDN (jsDelivr) and calculate its size.

npx oxphobia react
npx oxphobia lodash-es
npx oxphobia three

2. Measure local project size

Run without arguments to read the package.json in the current directory. It will identify the entry point from the main, module, or exports fields for analysis.

cd my-awesome-project
npx oxphobia

Example Output

📦 Analyzing Package: react

 📥 Downloaded: https://cdn.jsdelivr.net/npm/[email protected]/index.js
 🔎 Dependencies: ./cjs/react.production.min.js
 📥 Downloaded: https://cdn.jsdelivr.net/npm/[email protected]/cjs/react.production.min.js
 ...

✅ Dependency resolution complete.
⏳ Minifying with Oxc Minify...

========================================
 📊 Result for "react"
========================================
 Files count     : 2
 Minified size   : 6.42 KB (6,572 bytes)
 Gzipped size    : 2.75 KB (2,814 bytes)
========================================

🛠️ How It Works

  1. Parsing: Uses oxc-parser to build an AST (Abstract Syntax Tree) and extracts dependencies from import, require, and export statements.
  2. Resolution:
    • Local files are read from the file system.
    • External packages are resolved and downloaded via the jsDelivr API.
  3. Bundling: Combines dependencies in-memory.
  4. Minification: Compresses the code (Mangle & Compress) using oxc-minify.
  5. Measuring: Compresses the minified code using Node.js zlib (Gzip) and calculates the final byte count.

⚠️ Limitations

  • Non-JS assets such as CSS and images are ignored.
  • Advanced bundler configurations (e.g., Webpack/Rollup/Vite plugins) are not supported. It only tracks pure JS/ESM dependencies.

💻 Requirements

  • Node.js >= 18.12.0

🤝 Contributing

Pull requests are welcome!

📄 License

MIT