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

@scratchyjs/vite-plugin

v26.3.22-1774223623833

Published

Vite plugin preset and configuration helpers for Scratchy applications. Bundles Qwik City, Qwik, and `vite-tsconfig-paths` into a single `scratchyVite()` call, with optional Tailwind CSS and React interop, plus helpers for build and dev-server configurati

Readme

@scratchyjs/vite-plugin

Vite plugin preset and configuration helpers for Scratchy applications. Bundles Qwik City, Qwik, and vite-tsconfig-paths into a single scratchyVite() call, with optional Tailwind CSS and React interop, plus helpers for build and dev-server configuration.

Installation

pnpm add -D @scratchyjs/vite-plugin

Usage

Minimal vite.config.ts

import { createScratchyConfig } from "@scratchyjs/vite-plugin";
import { defineConfig } from "vite";

export default defineConfig(async () => createScratchyConfig());

With options

import { createScratchyConfig } from "@scratchyjs/vite-plugin";
import { defineConfig } from "vite";

export default defineConfig(async () =>
  createScratchyConfig({
    // Rendering
    react: true, // enable @builder.io/qwik-react
    tailwind: true, // enable @tailwindcss/vite (default: true)

    // Dev server
    port: 4173,
    backendUrl: "http://localhost:5000",
    proxyPaths: ["/trpc", "/external/api"],

    // Build
    target: "es2022",
    sourcemap: true,
    manualChunks: { vendor: ["@builder.io/qwik"] },
  }),
);

Tailwind config

// tailwind.config.ts
import { createTailwindConfig } from "@scratchyjs/vite-plugin";

export default createTailwindConfig({
  content: ["./src/**/*.{ts,tsx,mdx}"],
  darkMode: "class",
});

API

scratchyVite(options?): Promise<PluginOption[]>

Returns an array of Vite plugins: Qwik City, Qwik, vite-tsconfig-paths, and optionally @builder.io/qwik-react and @tailwindcss/vite.

Options (ScratchyViteOptions)

| Option | Default | Description | | ---------- | ------- | -------------------------------- | | react | false | Include @builder.io/qwik-react | | tailwind | true | Include @tailwindcss/vite |

createBuildConfig(options?): UserConfig["build"]

Returns a Vite build config with sensible Scratchy defaults.

Options (BuildConfigOptions)

| Option | Default | Description | | -------------- | ---------- | --------------------------------------------- | | target | "es2022" | esbuild target | | sourcemap | true | Emit source maps | | manualChunks | — | Record or function for manual chunk splitting |

createServerConfig(options?): Pick<UserConfig, "server" \| "preview">

Returns a Vite server + preview config that proxies API paths to the Fastify backend.

Options (ServerConfigOptions)

| Option | Default | Description | | ------------ | ---------------------------- | ----------------------- | | port | 4173 | Dev/preview server port | | backendUrl | "http://localhost:5000" | Fastify backend URL | | proxyPaths | ["/trpc", "/external/api"] | Paths to proxy |

createScratchyConfig(options?): Promise<UserConfig>

Combines scratchyVite, createServerConfig, and createBuildConfig into a single complete Vite UserConfig.

Accepts all options from ScratchyViteOptions, BuildConfigOptions, and ServerConfigOptions.

createTailwindConfig(options?): TailwindConfig

Returns a default Tailwind CSS configuration with Scratchy's theme extensions (primary/accent colours, Inter + JetBrains Mono font families).

Options (TailwindConfigOptions)

| Option | Default | Description | | ---------- | ----------------------------- | ---------------------- | | content | ["./src/**/*.{ts,tsx,mdx}"] | Template glob patterns | | darkMode | "class" | Dark mode strategy |

Documentation

https://scratchyjs.com/rendering