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

rolldown-plugin-relay

v0.1.2

Published

Rolldown/Vite 8 plugin to replace babel-plugin-relay

Readme

rolldown-plugin-relay

A Rolldown/Vite 8 plugin that tries to be a drop-in replacement for babel-plugin-relay

Given a file containing graphql tagged template literals, the plugin replaces each tag with an import of the corresponding Relay compiler artifact. This is the same transform that babel-plugin-relay performs, implemented as a native Rolldown plugin using OXC for parsing

Install

npm install rolldown-plugin-relay

graphql and rolldown (or vite v8+) are peer dependencies

Usage

// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import relay from 'rolldown-plugin-relay'

export default defineConfig({
  plugins: [
    react(),
    relay(),
  ],
})

Then remove babel-plugin-relay from your Babel/Vite config and dependencies

Options

All options are optional. Defaults match babel-plugin-relay

| Option | Type | Default | Description | |---|---|---|---| | artifactDirectory | string | undefined | Custom artifact directory. When unset, uses colocated __generated__/ folders | | isDev | boolean | true | Emit runtime hash staleness warnings | | isDevVariableName | string | undefined | Gate dev warnings behind a runtime variable (e.g. "__DEV__") instead of a build-time boolean | | eagerEsModules | boolean | true | Generates import declarations. When false, generates memoized require() calls instead | | jsModuleFormat | "commonjs" \| "haste" | undefined | When "haste", uses bare filenames for artifact imports | | codegenCommand | string | "relay-compiler" | Command name shown in staleness warning messages | | legacyFiltering | boolean | false | Enable handler-side filtering for older Rollup/Vite versions that don't support hook filters |

Note: eagerEsModules defaults to true, same as the Babel plugin as of ~v19

Vite 8 compatibility

Vite 8 uses Rolldown internally but does not currently pass meta.ast to plugin transform hooks (as far as I can tell). The plugin falls back to parsing with oxc-parser in this case. If Vite exposes meta.ast in a future release, the fallback will be skipped automatically

Developing

Setup

pnpm install

Testing

pnpm test

Update snapshots:

pnpm test -- -u

Building

pnpm lint
pnpm build

License

MIT