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

pageflare

v1.3.0

Published

Framework integrations for Pageflare static site optimization

Downloads

292

Readme

pageflare

Framework integrations for Pageflare — Vite, Nuxt, Astro, Next.js, and Netlify plugins for zero-config static site optimization.

Install

npm install -D pageflare

Vite

// vite.config.ts
import pageflare from 'pageflare/vite'

export default defineConfig({
  plugins: [pageflare()]
})

Also works with SvelteKit, Remix, and SolidStart (all Vite-based).

Astro

// astro.config.mjs
import pageflare from 'pageflare/astro'

export default defineConfig({
  integrations: [pageflare()]
})

Nuxt

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['pageflare/nuxt'],
  pageflare: {
    platform: 'vercel' // optional
  }
})

Next.js

Next.js integration supports output: 'export' mode. Chain pageflare after the build:

{
  "scripts": {
    "build": "next build && pageflare out/"
  }
}

Or use the programmatic API:

// scripts/build.mjs
import { optimizeNextExport } from 'pageflare/next'
await optimizeNextExport()

Optionally validate your config:

// next.config.mjs
import withPageflare from 'pageflare/next'

export default withPageflare()({
  output: 'export',
})

Netlify

# netlify.toml
[[plugins]]
package = "pageflare"

Pass extra CLI flags:

[[plugins]]
package = "pageflare"
  [plugins.inputs]
  args = "--force --platform netlify"

Options

All integrations accept the same options:

pageflare({
  // Pipeline
  platform: 'auto',          // 'auto' | 'vercel' | 'netlify' | 'cloudflare-pages' | 'none'
  prod: true,                // Production build — enables platform CDN image rewrites
  cleanOutput: true,         // Wipe output dir before writing (refuses if equal to input)
  noBrowser: true,           // Force heuristic fallback (no real-browser extraction)
  failOnBrokenRefs: true,    // Exit non-zero on internal 404 references

  // Build-time SEO/GEO/Audit/PWA opt-ins (idempotent, off by default)
  withGeo: true,             // sitemap.xml, robots.txt, llms.txt, .well-known/*
  withSeo: true,             // viewport / charset / canonical / OG meta
  withAudit: true,           // emit audit.json
  withPwa: true,             // manifest, service worker, icons (reads pageflare.pwa.jsonc)

  // Diagnostics + escape hatch
  log: 'warn',               // 'off' | 'error' | 'warn' | 'info' | 'debug'
  args: ['--force'],         // extra CLI flags passed verbatim
  configOverrides: {         // override pageflare.jsonc fields per-build
    'image.format': 'avif',
  },
})

Each option maps 1:1 to the underlying CLI flag (cleanOutput → --clean-output, withGeo → --with-geo, etc.) — see the CLI reference for what each one does.

How It Works

This package depends on @pageflare/cli, which installs the platform-specific pageflare binary. Each integration hooks into the framework's post-build lifecycle and runs pageflare <outputDir> --output <outputDir> to optimize HTML, CSS, JS, images, and fonts in place. Pass inPlace: false if you'd rather have pageflare write to its default <outputDir>/.appz/output/static/ instead.

Pageflare 0.9+ uses a real browser (Chrome via Lightpanda) to extract above-fold critical CSS, hero/LCP preload candidates, font preloads, and below-fold lazy-render boundaries — replacing string-scanning heuristics with layout-aware decisions. CI environments without Chrome can opt out with noBrowser: true (or args: ['--no-browser']) to fall back to the heuristic path.

Documentation

License

MIT