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

hexo-lightning-minify

v0.2.2

Published

A Hexo plugin that can automatically minify JS, CSS, and HTML files at lightning speed.

Readme

hexo-lightning-minify

Introduction

This plugin is a modular minifier extracted from hexo-renderer-multi-next-markdown-it. Refactored with modern minification tools (e.g., lightningcss), it achieves significant performance improvements compared to legacy implementations.

For comprehensive optimization solutions, consider using hexo-optimize. This project primarily serves as a companion package for ShokaX, focusing on essential minification and optimization functionalities.

Installation

pnpm add hexo-lightning-minify # Recommended with pnpm
npm install hexo-lightning-minify

Configuration

minify:
  js:
    enable: true # Not recommended for ShokaX (built-in esbuild optimization). Enable for other themes.
    exclude: # Excluded files (string[] compatible with micromatch patterns)
  css:
    enable: true # Enable CSS optimization
    options:
      targets: ">= 0.5%" # Browser targets in browserslist format
    exclude: # Excluded files (string[] compatible with micromatch patterns)
  image:
    enable: true # Enable image preprocessing and automatic WebP conversion
    options:
      # Format selection
      avif: true
      webp: false
      quality: 60 # Image quality (1-100 integer, lossless, or nearLossless)
      effort: 2 # CPU workload (0-6 integer, lower values prioritize speed)
      replaceSrc: true # Automatically replace local image URLs in HTML with optimized versions
      # Note: Service Worker implementation is recommended for less intrusive URL replacement
      enableSubSampling: true # Enable advanced chroma subsampling
      # For AVIF: Enables 4:2:0 subsampling (4:4:4 when disabled), optimizing size with minimal quality loss
      # For WebP: Allows extended CPU processing time for enhanced quality
      destroyOldRoute: false # Generate only processed images (preserve original assets)
      persistCache: true # Enable persistent caching of processed images
      # Stores optimized images on disk to accelerate subsequent builds
    exclude: # Excluded files (string[] compatible with micromatch patterns)

Features

  • [x] Automatic minification for JS, CSS, and HTML
  • [x] Automatic CSS prefix compatibility handling based on browser targets
  • [x] Automatic AVIF conversion and image preprocessing
  • [ ] Preconnect optimization (long-term roadmap)

Benchmark

Note: Initial benchmark tests included HTML compression which has since been deprecated. Current results may vary.

Performance metrics from ShokaX v0.3.9:

Testing framework using hexo-many-posts:

Environment: Hexo 6.3.0, minification limited to HTML/CSS/JS

| | base | hexo-neat | hexo-minify | hexo-all-minifier | hexo-lightning-minify | | :--------------------------- | ------- | --------- | ----------- | ----------------- | --------------------- | | landscape | 10.529s | 37.918s | 36.844s | 38.572s | 16.304s | | next | 27.275s | 36.124s | 42.854s | 37.063s | 29.880s | | butterfly | 13.853s | 26.641s | 26.736s | 35.973s | 16.796s | | particlex | 24.422s | 200.641s | 193.981s | 201.601s | 40.478s | | reimu | 17.631s | 52.432s | 48.524s | 51.835s | 23.938s | | shokax(hexo-renderer-marked) | 13.189s | 20.618s | 19.658s | 22.448s | 14.619s |

chart

| | base | hexo-neat | hexo-minify | hexo-all-minifier | hexo-lightning-minify | | :--------------------------- | ------------ | ------------ | ------------ | ----------------- | --------------------- | | landscape | 99,617,529B | 97,186,156B | 92,010,232B | 97,184,707B | 88,175,339B | | next | 32,469,157B | 30,087,003B | 28,744,583B | 30,059,443B | 28,020,740B | | butterfly | 37,593,633B | 37,237,074B | 33,485,597B | 34,897,171B | 35,504,670B | | particlex | 540,876,348B | 226,997,833B | 214,050,994B | 226,990,791B | 221,896,130B | | reimu | 110,252,086B | 95,756,049B | 91,074,639B | 95,715,486B | 88,088,009B | | shokax(hexo-renderer-marked) | 142,585,026B | 142,404,138B | 140,988,094B | 142,011,849B | 140,457,331B |

hexo-theme-particlex excluded from visualization for clearer comparison

chart2