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

@flightdev/bundle-analyzer

v0.1.1

Published

Bundle analysis and optimization recommendations for Flight Framework

Readme

@flight-framework/bundle-analyzer

Bundle analysis and optimization recommendations for Flight Framework.

Installation

npm install -D @flight-framework/bundle-analyzer

Quick Start

CLI Usage

# Analyze default ./dist directory
npx @flight-framework/bundle-analyzer

# Specify build directory
npx @flight-framework/bundle-analyzer -d ./build

# Generate HTML report
npx @flight-framework/bundle-analyzer -f html --open

# Output JSON for CI/CD
npx @flight-framework/bundle-analyzer -f json -o report.json

Programmatic Usage

import { analyzeBundle, generateReport } from '@flight-framework/bundle-analyzer';

const result = await analyzeBundle({
    buildDir: './dist',
});

console.log(`Total size: ${result.totalSize} bytes`);
console.log(`Recommendations: ${result.recommendations.length}`);

// Generate text report
const report = generateReport(result, 'text');
console.log(report);

CLI Options

| Option | Description | Default | |--------|-------------|---------| | -d, --dir <path> | Build directory to analyze | ./dist | | -f, --format <type> | Output format: json, html, text | text | | -o, --output <path> | Output file path | stdout | | --open | Open HTML report in browser | false | | -h, --help | Show help | - |

Output

Text Report

============================================================
  FLIGHT BUNDLE ANALYSIS
============================================================

SUMMARY
----------------------------------------
  Total Size:     245.3 KB
  Gzip Size:      78.2 KB
  Brotli Size:    66.5 KB
  Chunks:         12
  Analysis Time:  234ms

CHUNKS
----------------------------------------

Chunk                               Size       Gzip
---------------------------------------------------------
index-abc123.js                   85.2 KB   28.1 KB [!]
vendor-def456.js                  62.1 KB   21.3 KB [~]
...

RECOMMENDATIONS
----------------------------------------
  [!] Large chunk: index-abc123.js
      This chunk exceeds the recommended size limit.
      Action: Consider code splitting.

HTML Report

Generates a dark-themed, responsive HTML report with:

  • Summary statistics
  • Chunk breakdown with size bars
  • Recommendations with severity indicators

JSON Report

Full analysis data for CI/CD integration:

{
  "chunks": [...],
  "modules": [...],
  "duplicates": [...],
  "recommendations": [...],
  "totalSize": 251234,
  "totalGzipSize": 80123,
  "timestamp": 1705056000000
}

Recommendations

The analyzer detects common issues:

| ID | Type | Description | |----|------|-------------| | large-chunk | Critical | Chunk exceeds size threshold | | duplicate-dependency | Warning | Same package bundled multiple times | | heavy-dependency | Suggestion | Large package with lighter alternative | | no-code-splitting | Suggestion | Single bundle without dynamic imports |

API Reference

analyzeBundle(options)

interface AnalyzerOptions {
    buildDir: string;
    includeSourceMaps?: boolean;
    sizeThreshold?: number;      // Default: 50000
}

const result: AnalysisResult = await analyzeBundle(options);

generateReport(result, format)

type ReportFormat = 'json' | 'html' | 'text';

const report: string = generateReport(result, format);

License

MIT