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

@sigx/vite

v0.4.8

Published

Vite plugin for SignalX Framework with HMR, library builds, and automatic type generation

Readme

@sigx/vite

Vite plugin for SignalX — wires up dev-mode source aliasing, HMR for component(), and ships a small CLI that generates TypeScript definitions for tag-named components.

Install

npm install -D @sigx/vite

@sigx/vite peer-depends on vite >= 8 and sigx.

Usage

Add the plugin to your vite.config.ts:

import { defineConfig } from 'vite';
import sigx from '@sigx/vite';

export default defineConfig({
  plugins: [sigx()],
});

Named import works too:

import { sigxPlugin } from '@sigx/vite';

That's it — the plugin handles the rest. In dev it aliases the @sigx/* packages to their source so a single reactivity instance is shared across the graph; in build mode it gets out of the way.

Options

sigx({
  hmr: true, // default — set to false to disable HMR transforms
});

| Option | Type | Default | Description | | ------ | --------- | ------- | ------------------------------------------------------------ | | hmr | boolean | true | Inject the HMR runtime and transform component() factories so state survives module reloads. |

TSX setup

For JSX/TSX, configure your tsconfig.json to use SignalX's JSX runtime:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "sigx"
  }
}

CLI: sigx-types

The package also exposes a sigx-types CLI that scans your project for components declared with a tag name (e.g. component('my-button', …)) and emits global type augmentations into node_modules/.sigx/, so JSX gets intellisense for <my-button> without manual imports.

npx sigx-types              # one-shot generation
npx sigx-types --watch      # regenerate on change
npx sigx-types --help

| Flag | Default | Description | | ---------------- | ---------------------- | ------------------------------------------------- | | --watch, -w | off | Watch src/, components/, pages/ for changes | | --out, -o | node_modules/.sigx | Output directory | | --include | **/*.tsx,**/*.ts,**/*.jsx | Glob patterns to scan (comma-separated) | | --exclude | node_modules/**,dist/**,**/*.d.ts | Glob patterns to skip |

Add the output to your tsconfig.json include so the editor picks it up:

{
  "include": ["src", "node_modules/.sigx/**/*.d.ts"]
}

How HMR works

When hmr: true (default), the plugin transforms each module that imports component() so that:

  1. Each component definition is registered with a stable id (moduleId:index).
  2. Live instances are tracked by id.
  3. On module reload, existing instances are re-bound to the new factory and re-rendered without losing their per-instance signal state.

If something looks off after an HMR update, a full reload always falls back to a clean state.

Subpath exports

For advanced setups, the package exposes:

  • @sigx/vite/hmr — the browser-side HMR runtime (normally injected for you).
  • @sigx/vite/libdefineLibConfig helper used internally by the @sigx/* packages to produce their library builds with Vite 8 / Rolldown.

Most users won't need either directly.