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

@arviahq/vite-plugin

v2.1.0

Published

Framework-agnostic Vite plugin for .arv files: CSS, JS generation with HMR.

Readme

@arviahq/vite-plugin

Framework-agnostic Vite plugin for .arv files: CSS + JS generation with HMR, plus optional .d.ts emission. Most projects use a framework wrapper (@arviahq/vite-plugin-react, -vue, -preact) instead of this package directly.

import { arvia } from "@arviahq/vite-plugin";

export default defineConfig({
  plugins: [arvia({ theme: "src/theme.arv" })],
});

Options

| Option | Type | Default | Description | | ------- | ------------------------------------------------ | -------------------------- | ----------------------------------------------------------------- | | theme | string | src/theme.arv if present | Shared theme file whose tokens/recipes every .arv file can use. | | dts | boolean \| 'sibling' \| 'central' \| DtsConfig | 'central' | How to emit .d.ts declarations (see below). |

Type checking with plain tsc (dts)

By default (dts: 'central') the plugin emits real declarations so you can typecheck .arv imports with plain tsc — no arvia-tsc, no plugins entry. Declarations are mirrored into .arvia/types, e.g. src/components/stack.arv.arvia/types/components/stack.arv.d.ts, updated on save and at build with stale mirrors pruned. The plugin drops a self-ignoring .gitignore into that folder, so you never commit generated declarations and don't touch your root .gitignore.

The one thing you add is a rootDirs overlay so tsc resolves ./*.arv imports against the mirror:

// tsconfig.json
{
  "compilerOptions": {
    "moduleResolution": "bundler", // Vite's default; see note below
    "rootDirs": ["src", ".arvia/types"],
  },
}
// package.json
{ "scripts": { "typecheck": "tsc --noEmit" } }

Other modes:

  • 'sibling' (or true) — writes foo.arv.d.ts next to each source file. Resolved by tsc with no rootDirs, at the cost of files in your src tree.
  • false — writes nothing; types come from @arviahq/typescript-plugin (the tsserver plugin + arvia-tsc) instead.

DtsConfig (object form) customizes central mode:

arvia({
  dts: {
    mode: "central", // default when an object is given
    dir: ".arvia/types", // central directory, relative to the Vite root
    sourceRoot: "src", // mirrored source root; must match rootDirs[0]
  },
});

Resolution note. Central/sibling .d.ts files are found via TypeScript's .d.ts-append, which applies under moduleResolution: "bundler" (Vite's default) and node10/classic. It does not apply under node16/nodenext — those consumers should keep moduleResolution: "bundler" or use the tsserver plugin instead.

Generating declarations in CI (arvia gen)

The arvia CLI materializes declarations without running Vite — useful before a CI tsc step:

arvia gen src            # writes .arvia/types/**, prunes stale mirrors
arvia gen src --clean    # wipe the central dir first for a hermetic regen

Flags: --dts-mode central|sibling (default central), --dts-dir <dir> (default .arvia/types), --src-root <dir> (default src), --clean.