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

@zappdev/vite

v0.6.0-alpha.2

Published

Vite plugin for [Zapp](https://github.com/zappdev/zapp). Bundles workers, routes headless workers from `zapp.config.ts`, serves worker scripts in dev.

Readme

@zappdev/vite

Vite plugin for Zapp. Bundles workers, routes headless workers from zapp.config.ts, serves worker scripts in dev.

Install

zapp init scaffolds this automatically. For manual setup:

bun add -D @zappdev/vite

Usage

// vite.config.ts
import { defineConfig } from "vite";
import { zappWorkers } from "@zappdev/vite";
import zappConfig from "./zapp.config";

export default defineConfig({
  plugins: [
    zappWorkers({ headless: zappConfig.headless }),
    // ...your other plugins
  ],
});

Pass headless directly from your zapp.config.ts so the plugin stays in lockstep with the rest of the build.

What the plugin does

Webview-spawned worker discovery

Scans your source files for new Worker("./path") and new SharedWorker("./path") patterns at build time. For each unique worker script:

  1. Bundles it as a separate entry (via Vite's build API) to dist/_workers/<name>.mjs.
  2. Rewrites the source specifier to the bundled URL so the runtime can load it via the WebView's standard new Worker("/_workers/...") call.

Headless worker bundling

For each entry in zapp.config.ts → headless: { id: "path" }, bundles the source to dist/_workers/_headless_<id>.mjs. Native code loads these at app boot via the generated .zapp/zapp_headless_workers.zc.

Dev middleware

In zapp dev, the plugin installs a middleware on Vite's dev server that serves /_workers/* from the live-bundled .zapp/workers/ directory, so the WebView and native worker loader can fetch worker scripts over HTTP during development.

Alias forwarding

Picks up resolve.alias from your Vite config and applies the same aliases when bundling workers, so path mappings like @/* work inside worker code.

Options

interface ZappWorkersOptions {
  /**
   * Headless workers: map of worker ID → source path (relative to project root).
   * Usually passed straight from zapp.config.ts's `headless` field.
   */
  headless?: Record<string, string>;
}

Reference

Full framework overview, runtime API, and worker semantics: see llms.txt at the repo root.