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

@zerolith/vite

v1.5.0

Published

The Vite plugin for zerolith: hot module replacement that swaps components in place and keeps named signal state, with no effect on production builds

Readme

@zerolith/vite

The Vite plugin for zerolith, for projects that use Vite. A zerolith project does not need Vite: zerolith dev and zerolith build from @zerolith/cli serve and bundle it on their own, with the same passes this plugin runs. zerolith also runs under Vite with no plugin: the packages are plain ES modules, and Vite's default development condition selects the diagnostic build and the inspector in development. The plugin adds what a build step makes possible.

// vite.config.ts
import { defineConfig } from "vite";
import { zerolith } from "@zerolith/vite";

export default defineConfig({
    plugins: [zerolith()]
});
  • JSX. .jsx and .tsx files are lowered to the html calls they stand for, so nothing from JSX reaches the browser. jsx: false leaves them to Vite.
  • Scoped stylesheets. import card from "./card.css?scoped" gives the styles a css literal gives, from the file as Vite's CSS pipeline processes it, and an edit to the file replaces its rules in place.
  • Hot replacement that understands components. In development, exported components become stable proxies to their latest version, render and hydrate roots render again after an edit, and named signals keep their values. hot: false leaves it out, as a test runner wants: Vitest takes zerolith({ hot: false }) for JSX and ?scoped stylesheets.
  • Warnings at transform time for a frozen ${signal.get()} read in a template and for images, buttons, and frames without an accessible name, each with a diagnostic code. lint: false turns them off.
  • Templates prepared at build time. vite build scans every html literal ahead of time, so the browser binds templates without scanning them and the scanner leaves the bundle, and a template with no bindings is created once at module scope. A module that uses html other than as a template tag, or re-exports it, fails the build at that line. prepare: false keeps the scanner.
  • Build checks. A client build fails when a view loaded with the router's lazy(), or a locale of a compiled message index, is also imported statically, which would merge it into the importing chunk. A build in production mode also fails when the development build of a zerolith package reached the output.

The guide is on the docs site.

Install with npm install --save-dev @zerolith/vite, at the version of zerolith the project uses: the two share the zerolith/internal entry, and the plugin stops with package_version_mismatch on any other version. The API is frozen at 1.0: a breaking change comes only in a major, after a deprecation notice, and the support policy says how long a line gets fixes.

Documentation

  • The Vite guide explains it with examples that run as tests.
  • The reference lists every export, generated from the source.
  • New to zerolith? The tutorial builds an app step by step, and the playground runs code in the browser.

License

Apache-2.0. See LICENSE.