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

vite-plugin-tanstack-start-zephyr

v1.4.0

Published

Vite plugin for Zephyr with TanStack Start support

Readme

vite-plugin-tanstack-start-zephyr

Vite compatibility

Vite plugin for deploying TanStack Start applications to Zephyr with SSR and TAP CSR support.

Overview

This plugin runs after TanStack Start finishes building, packages the dist/ output, and uploads it as an SSR deployment or a TAP CSR package.

Installation

pnpm add -D vite-plugin-tanstack-start-zephyr

Usage

Add the plugin to your vite.config.ts:

import { defineConfig } from 'vite';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import { withZephyr } from 'vite-plugin-tanstack-start-zephyr';

export default defineConfig({
  plugins: [tanstackStart(), withZephyr()],
});

Configuration

The plugin delegates Zephyr app detection and auth to zephyr-agent. In most projects, withZephyr() is enough.

Plugin options

| Option | Type | Required | Description | | -------------- | ---------------- | -------- | ------------------------------------------------------------------------ | | target | string | No | Zephyr artifact family; use tap-app for TAP packages. | | mfConfigs | array | TAP | Every Module Federation container included in the snapshot. | | federation | array | TAP | Matching build-stat metadata for each mfConfigs entry. | | outputDir | string | No | Build output root. Defaults to dist/. | | snapshotType | 'csr' \| 'ssr' | No | TAP defaults to CSR; ordinary TanStack Start deployments default to SSR. | | entrypoint | string | No | Server entry relative to outputDir, used only for an SSR snapshot. |

Example with overrides:

const tapFederationMetadata = {
  mfConfigs: [
    { name: 'desktop', filename: 'targets/desktop/remoteEntry.mjs', library: { type: 'module' } },
    { name: 'mobile', filename: 'targets/mobile/remoteEntry.mjs', library: { type: 'module' } },
    { name: 'quickjs', filename: 'targets/quickjs/remoteEntry.mjs', library: { type: 'module' } },
  ],
  federation: [
    { name: 'desktop', remote: 'targets/desktop/remoteEntry.mjs', library_type: 'module' },
    { name: 'mobile', remote: 'targets/mobile/remoteEntry.mjs', library_type: 'module' },
    { name: 'quickjs', remote: 'targets/quickjs/remoteEntry.mjs', library_type: 'module' },
  ],
};

withZephyr({
  target: 'tap-app',
  outputDir: 'dist',
  ...tapFederationMetadata,
});

TAP output is uploaded as a CSR package by default, so a desktop/mobile/QuickJS ESM package does not need a server/index.js. To publish an actual SSR package, opt in explicitly:

withZephyr({
  target: 'tap-app',
  snapshotType: 'ssr',
  entrypoint: 'server/index.js',
  ...tapFederationMetadata,
});

TAP publication requires both non-empty metadata arrays. Every mfConfigs item must have exactly one federation item with the same name and with filename === remote; mismatched metadata fails before the build starts. TanStack Start does not infer this information from framework plugins. A valid singleton is also exposed through the legacy mfConfig field for older consumers; multi-container packages use only the complete mfConfigs array.

How It Works

  1. Build: TanStack Start owns and completes its client/server child compilers
  2. Finalize: The plugin's post-ordered buildApp hook waits for framework post-processing
  3. Extract: The plugin collects the finalized shared output tree once
  4. Upload: Server, client, public, and prerendered files are uploaded as one snapshot
  5. Deploy: Files are stored in content-addressable KV storage
  6. Run: Orchestration worker loads and runs your app on the edge

The plugin never starts TanStack's child compilers itself and refuses to publish when an environment is incomplete.

Build Output

The plugin processes TanStack Start's build output:

dist/
├── server/           # Server-side code
│   ├── index.js     # Main entry point
│   └── assets/      # Server bundles
└── client/          # Client-side assets
    └── assets/      # Client bundles

Deployment Architecture

Your app runs in Cloudflare's orchestration worker using dynamic worker loaders:

Request → Orchestration Worker → Load Your App (Isolate) → Response

Features:

  • ✅ Multiple versions live simultaneously
  • ✅ Content-addressable storage (efficient caching)
  • ✅ SSR and API routes support
  • ✅ Hot swapping without redeployment
  • ✅ Per-version isolation

Development

Build Plugin

cd libs/vite-plugin-tanstack-start-zephyr
pnpm build

Run Tests

pnpm test

Link Locally

pnpm link --global
# In your project
pnpm link --global vite-plugin-tanstack-start-zephyr

Requirements

  • Node.js version supported by Vite 7 or 8 and TanStack Start 1.x
  • TanStack Start 1.0+
  • Vite 7 or 8

License

Apache-2.0

Related