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

mobin-dev-vite-proxy

v0.1.2

Published

Development-only Vite proxy for Mobin APIs, SSO and local backend cookies.

Readme

mobin-dev-vite-proxy

Typed Vite development proxy for APIs, SSO pages and backend cookies. Build and preview are excluded. Legacy localhost checks in proxied JavaScript are adapted automatically to keep SSO API requests on the local origin.

Install and use

npm install --save-dev mobin-dev-vite-proxy
import { defineConfig } from "vite";
import mobinDevViteProxy, { type MobinDevViteProxyOptions } from "mobin-dev-vite-proxy";

const options: MobinDevViteProxyOptions = {
    baseUrl: "https://example.com",
};

export default defineConfig({
    plugins: [mobinDevViteProxy(options)],
});

Request /api/... and visit /sso/... on the Vite origin. The plugin forwards them to baseUrl. A lazy baseUrl: () => selectedBackend is also supported and is evaluated when the development server starts. Restart dev after changing it.

Cookies

Every Set-Cookie header is processed, regardless of its cookie name. The plugin removes Domain, so the browser stores the cookie on the local host. Cookie paths are preserved, with any baseUrl path prefix removed. Same-name cookies with different paths stay distinct. HttpOnly, Expires and Max-Age are preserved, including cookie deletion.

For HTTP dev servers, Secure and Partitioned are removed and SameSite=None becomes SameSite=Lax. HTTPS dev servers preserve those attributes. An absent SameSite defaults to Lax locally. Existing Strict and Lax values are preserved. Secure-prefixed cookies such as __Secure- and __Host- require local HTTPS under the browser's cookie rules. Cookie names are preserved.

Cookies are received only from responses passing through this proxy. Open the SSO on the local /sso URL to log in. JavaScript cannot read cookies marked HttpOnly. The application must use backend cookie authentication. Browser storage limits and invalid backend cookie values still apply.

Options

| Option | Default | Purpose | | ------------ | ------------------ | -------------------------------------- | | baseUrl | Required | Backend URL or a function returning it | | proxyPaths | ["/api", "/sso"] | Local path prefixes to forward |

Existing unrelated Vite proxy routes are preserved. Redirects to the backend are rewritten to the local origin. Redirects to external identity providers are preserved. The development server's port, host and TLS settings remain application settings.

Develop and publish

The package ships native ESM and TypeScript declarations, with no build step or runtime dependencies. Node.js 20+ is required. Integration tests use Vite 8; Vite 5.4 compatibility was verified for the preceding release.

npm install
npm test
npm pack --dry-run
npm publish

For this application's local installation, run npm install --save-dev ./mobin-dev-vite-proxy from the application root. After publishing, replace that dependency with npm install --save-dev [email protected].

The initial license is UNLICENSED. Select the intended license before public distribution.

The automatic adapter replaces exact quoted localhost hostnames in proxied JavaScript. It supports the current SSO hostname checks, including string tables. The application must still use the incoming origin when choosing its API URL.

Supported Vite versions: 5.4.20 through 8.x. Vite 8 requires Node.js 20.19+ or 22.12+.