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

@vrowzer/rolldown

v0.0.0

Published

Pre-bundled @rolldown/browser for easy browser usage

Readme

@vrowzer/rolldown

Pre-bundled @rolldown/browser for easy browser usage. All dependencies (@napi-rs/wasm-runtime, memfs, etc.) are pre-resolved, and the internal memfs is replaced with @vrowzer/fs for filesystem instance sharing.

🤔 Why?

@rolldown/browser cannot be used with a simple import in the browser because:

  • rolldown-binding.wasi-browser.js imports @napi-rs/wasm-runtime via bare specifiers (not resolvable in browsers)
  • Worker scripts also use bare specifier imports
  • WASM binary URL is resolved via import.meta.url relative paths
  • SharedArrayBuffer requires Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers

This package pre-bundles everything so that bare specifiers are resolved and all files are co-located.

🚀 Usage

Two build types are provided:

Shared build: @vrowzer/fs external (for Web Worker / shared filesystem)

@vrowzer/fs is not bundled. The consumer provides @vrowzer/fs, allowing rolldown and other code to share the same memfs Volume instance.

import { rolldown } from '@vrowzer/rolldown'
import { memfs } from '@vrowzer/rolldown/experimental'

memfs.volume.fromJSON({
  '/src/index.js': 'import { add } from "./math.js"\nconsole.log(add(1, 2))',
  '/src/math.js': 'export function add(a, b) { return a + b }'
})

const bundle = await rolldown({ input: '/src/index.js', cwd: '/' })
const { output } = await bundle.generate({ format: 'esm' })
console.log(output[0].code)

Standalone build: Fully self-contained (for browser)

@vrowzer/fs is bundled. No additional dependencies needed.

import { rolldown } from '@vrowzer/rolldown/browser'
import { memfs } from '@vrowzer/rolldown/browser/experimental'

memfs.volume.fromJSON({
  '/src/index.js': 'export const x = 1'
})

const bundle = await rolldown({ input: '/src/index.js', cwd: '/' })
const { output } = await bundle.generate({ format: 'esm' })

Exports

@vrowzer/rolldown / @vrowzer/rolldown/browser

Re-exports from @rolldown/browser:

  • rolldown - Main bundler function
  • VERSION - Rolldown version string

@vrowzer/rolldown/experimental / @vrowzer/rolldown/browser/experimental

Re-exports from @rolldown/browser/experimental:

  • memfs - In-memory filesystem ({ fs, volume }) backed by @vrowzer/fs
  • parseSync / parse - OXC-based JavaScript/TypeScript parser
  • transform / transformSync - Code transformation

@vrowzer/rolldown/utils / @vrowzer/rolldown/browser/utils

Re-exports from @rolldown/browser/experimental, compatible with rolldown/utils:

  • transform / transformSync - Code transformation (TypeScript strip, define replacement)
  • parse / parseSync - OXC-based JavaScript/TypeScript parser
  • minify / minifySync - OXC-based code minification
  • TsconfigCache - TypeScript config resolution cache
  • TransformOptions / TransformResult / ParseResult / ParserOptions / MinifyOptions / MinifyResult - TypeScript types

HTTP Headers

SharedArrayBuffer is required by the rolldown WASM runtime. The following HTTP headers must be set on the server:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Build

The package is built using rolldown itself:

pnpm build

This produces:

dist/
├── index.js                          # Shared build: main entry (@vrowzer/fs external)
├── experimental.js                   # Shared build: experimental (@vrowzer/fs external)
├── utils.js                          # Shared build: utils (transformSync)
├── chunks/                           # Shared build: shared chunks
├── worker.js                         # Shared: bundled WASI worker script
├── rolldown-binding.wasm32-wasi.wasm # Shared: WASM binary (~11MB)
└── browser/
    ├── index.js                      # Standalone build: main entry (@vrowzer/fs bundled)
    ├── experimental.js               # Standalone build: experimental (@vrowzer/fs bundled)
    ├── utils.js                      # Standalone build: utils (transformSync)
    └── chunks/                       # Standalone build: shared chunks

Both builds share the same worker.js and WASM binary. Within each variant, index.js and experimental.js share the same binding instance via code splitting, ensuring that files written via memfs are visible to rolldown().

Key build transformations

  • @napi-rs/wasm-runtime/fs internal memfs is replaced with @vrowzer/fs
  • process.cwd() is replaced with "/"
  • fs-proxy IPC buffer is expanded from ~10KB to ~10MB
  • Worker and WASM URLs are adjusted for the chunks/ subdirectory layout

🤝 Sponsors

©️ License

MIT