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

@savvy-web/rspress-builder

v1.2.2

Published

RSPress plugin builder for the Silk Suite, built on @savvy-web/bundler

Readme

@savvy-web/rspress-builder

npm License: MIT

Builds an RSPress plugin package on top of @savvy-web/bundler. One definePlugin call produces the dual-bundle shape an RSPress plugin needs: a Node plugin entry plus a browser, bundleless, CSS-module React runtime entry, each with the right externals and platform already set.

Install

npm install --save-dev @savvy-web/rspress-builder
# or
pnpm add -D @savvy-web/rspress-builder

@rspress/core, react, react-dom and typescript are peer dependencies the host plugin provides. @tsdown/css is a regular dependency of this package, so you do not install it yourself — tsdown loads it lazily when a CSS file is encountered.

Quick start

Add a savvy.build.ts to the plugin package root and call build() — it derives cwd and argv from process and applies the definePlugin preset automatically:

// savvy.build.ts
import { build } from "@savvy-web/rspress-builder";

await build();

Pass options to tune the preset — for example, to bundle @rspress/core declarations into the output types or disable the runtime bundle for a plugin with no browser component:

await build({ bundledPackages: ["@rspress/core"] });
await build({ runtime: false });

Wire the build targets into package.json scripts and run them with Node's native TypeScript support:

{
  "scripts": {
    "build:dev": "node savvy.build.ts --target dev",
    "build:prod": "node savvy.build.ts --target prod"
  }
}

The plugin entry (.) builds for Node with @rspress/core externalized. The runtime entry (./runtime) builds for the browser, bundleless, with CSS modules enabled and React, @rspress/core and @theme externalized so RSPress provides them at site build time.

For advanced use, definePlugin and runBuild remain exported as primitives.

Configuration

definePlugin keeps a small surface because RSPress plugins have a fixed shape:

  • runtime — build the ./runtime bundle. true (default) builds it, false disables it for a plugin with no runtime, an object tunes its dependency posture (externals, bundledPackages, dtsExternals, bundleNodeModules). It does not probe the filesystem; pass false when there is no runtime entry.
  • plugin — dependency posture tuning for the plugin (.) bundle; same shape as runtime's object form.
  • externals — build-wide externals merged into both bundles' built-in lists.
  • bundledPackages — packages whose declarations are inlined into the bundled .d.ts, for example ["@rspress/core"].
  • dtsExternals — packages externalized in the dts pass only (referenced via import in the emitted .d.ts) while the JS pass still bundles them.
  • bundleNodeModules — force-bundle node_modules (and workspace) JS dependencies into the package output.
  • meta — API Extractor api-model generation, on by default. Pass false to opt out.
  • transform, jsx, define — forwarded to the underlying bundler config.

bundledPackages, dtsExternals and bundleNodeModules can be set build-wide and/or tuned per bundle via plugin/runtime; a per-bundle value wins over the build-wide one. externals is the exception — a build-wide value merges into BOTH bundles rather than being overridden.

Ambient environment types

@savvy-web/rspress-builder ships a ./env types-only export with the ambient declarations an RSPress runtime component needs: import.meta.env (Vite's build-mode env, SSG_MD/SSR/MODE/BASE_URL/PROD/DEV) plus *.css and *.module.css module declarations. Add a triple-slash reference to a .d.ts in your project to pull them in:

/// <reference types="@savvy-web/rspress-builder/env" />

@savvy-web/bundler ships the same pattern for its own build-injected key — see its README — via /// <reference types="@savvy-web/bundler/env" />, which gives you process.env.__PACKAGE_VERSION__.

License

MIT