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

@oc-mui/vite-config

v1.1.1

Published

Shared Vite build configuration for the Opencast Management UI and standalone community plugins.

Readme

@oc-mui/vite-config

Shared Vite configurations and custom Vite plugins. Every app, package, and plugin in the workspace builds through a preset from here so build behaviour stays consistent.

Usage

In an app's vite.config.ts (see apps/shell/vite.config.ts for the full real-world version):

import path from "node:path";
import { defineConfig, loadEnv } from "vite";
import { createShellAppViteConfig } from "@oc-mui/vite-config";

export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, path.resolve(__dirname, "../.."), "");
  return createShellAppViteConfig({
    packageName: "shell",
    mode,
    env,
    invokerDir: __dirname,
  });
});

In an external community plugin:

import { createCommunityPluginConfig } from "@oc-mui/vite-config/community-plugin";

export default createCommunityPluginConfig({
  pluginName: "my-plugin",
  entry: "./src/index.ts",
});

Subpath exports

| Subpath | What it provides | |---------|------------------| | @oc-mui/vite-config/base | createBaseConfig — React, Tailwind, common aliases, sourcemaps. | | @oc-mui/vite-config (or ./index) | createShellAppViteConfig plus re-exports of the helpers. | | @oc-mui/vite-config/community-plugin | createCommunityPluginConfig — library-mode build for plugins published outside the workspace (CDN/JAR). Externalizes shared modules listed in @oc-mui/remote-plugin-loader's SHARED_MODULE_NAMES. | | @oc-mui/vite-config/proxy | Dev-server proxy table for backend endpoints (/admin-ng, /info, /graphql, …). | | @oc-mui/vite-config/ports | Centralised port assignments — shell on 3000, playground on 3001, etc. Prevents collisions when several dev servers run together. | | @oc-mui/vite-config/plugins/fragment-extractor | Custom Vite plugin: harvests GraphQL fragments from sources so the runtime can register them with the host's fragment registry. |

Internal Vite plugins

src/plugins/local-plugins-dev.ts is the dev-server piece that discovers .local-plugins/<name>/dist/*.mjs, serves them at /local-plugins/<name>/<file>.mjs, and exposes /local-plugins/manifest.json for the shell to load. Detailed write-up in docs/extend/distribution.md.

src/plugins/local-config-dev.ts serves a committed default config.json from disk at the shell's config fetch path when no backend proxy is configured — edit apps/shell/public/ui/config/management-ui/config.json and reload, no backend needed. When VITE_PROXY_TARGET is set, the proxy wins and this plugin is not registered. Dev-server only (apply: "serve").

src/plugins/cold-start-hint.ts prints a one-line notice when the shell dev server starts with a cold Vite dependency cache — otherwise the pre-bundle blocks silently for 1–2 minutes and looks like a hang.

Layer

Core infrastructure. Depends on @oc-mui/utils only.

See also