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

@studiometa/foehn-vite-plugin

v0.6.1

Published

Vite plugin for Føhn WordPress framework

Readme

@studiometa/foehn-vite-plugin

Vite plugin for the Føhn WordPress framework.

Installation

npm install -D @studiometa/foehn-vite-plugin vite

Usage

// vite.config.ts
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
import foehn from "@studiometa/foehn-vite-plugin";

export default defineConfig({
    plugins: [
        foehn({
            // Glob patterns for entry points
            input: ["src/js/app.js", "src/css/app.css"],

            // Files to watch for full reload (default: ["templates/**/*.twig"])
            reload: ["templates/**/*.twig", "app/**/*.php"],

            // Output directory (default: "dist")
            outDir: "dist",

            // Theme directory context (default: process.cwd())
            themeDir: "./theme",
        }),
        tailwindcss(),
    ],
});

Features

Glob Input Resolution

Input patterns support glob syntax:

foehn({
    input: ["src/js/*.js", "src/css/*.css"],
});

Vite Manifest

The plugin enables Vite's native manifest generation (build.manifest: true). The manifest is written to .vite/manifest.json in the output directory.

Hot Reload

During development, the plugin writes a hot file containing the dev server URL. The PHP side reads this file to detect dev mode and inject the Vite client script.

File Watching

The plugin watches files matching the reload patterns and triggers a full page reload when they change. This is useful for PHP and Twig files that don't go through Vite.

DDEV Integration

When a .ddev/config.yaml file is detected, the plugin automatically configures a proxy to the DDEV site, allowing seamless development with HMR.

Options

| Option | Type | Default | Description | | ---------- | -------------------- | ------------------------- | --------------------------------- | | input | string \| string[] | required | Entry point glob patterns | | reload | string \| string[] | ["templates/**/*.twig"] | Patterns to watch for full reload | | outDir | string | "dist" | Output directory for built assets | | themeDir | string | process.cwd() | Theme directory context | | hotFile | string | "hot" | Name of the hot file |

PHP Integration

Use the ViteManifest helper from the Føhn framework to enqueue assets:

use Studiometa\Foehn\Assets\ViteManifest;

#[AsAction("wp_enqueue_scripts")]
public function enqueueAssets(): void
{
    ViteManifest::fromTheme()
        ->enqueue("src/js/app.js", handle: "theme-app", inFooter: true)
        ->enqueue("src/css/app.css", handle: "theme-styles");
}

License

MIT