PHPackages                             kaiseki/wp-vite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kaiseki/wp-vite

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kaiseki/wp-vite
===============

Companion module for inpsyde/assets

1.0.0(2mo ago)0982MITPHPPHP ^8.2CI passing

Since Nov 20Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/kaisekidev/kaiseki-wp-vite)[ Packagist](https://packagist.org/packages/kaiseki/wp-vite)[ Docs](https://github.com/kaisekidev/kaiseki-wp-vite)[ RSS](/packages/kaiseki-wp-vite/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (19)Versions (4)Used By (0)

kaiseki/wp-vite
===============

[](#kaisekiwp-vite)

Companion module for [inpsyde/assets](https://github.com/inpsyde/assets) that registers the scripts and stylesheets emitted by a [Vite](https://vitejs.dev/) build from its `manifest.json`, with transparent hot-module-reload support against the Vite dev server.

It wires three `kaiseki/wp-hook` `HookProviderInterface`s through `ConfigProvider`:

- **`ViteAssetManager`** — reads each configured Vite manifest, turns every entry chunk (and its CSS imports) into an `inpsyde/assets` `Script`/`Style`, and registers them on `AssetManager::ACTION_SETUP`.
- **`ViteClientScriptRenderer`** — injects the `@vite/client` HMR script into `wp_head`/`admin_head`when the dev server is hot.
- **`OutputFilterRegistry`** — registers the configured `inpsyde/assets` output filters.

Installation
------------

[](#installation)

```
composer require kaiseki/wp-vite
```

Requires PHP 8.2 or newer.

Usage
-----

[](#usage)

Register `ConfigProvider` with your laminas-style config aggregator and provide the `vite` config slice. The `Config` builder offers a fluent API for assembling that slice:

```
use Kaiseki\WordPress\Vite\Config;
use Kaiseki\WordPress\Vite\AssetFilter\ScriptFilter;

$vite = (new Config())
    // Path to a Vite build manifest; pass true for the hot (dev-server) variant.
    ->addManifest(get_stylesheet_directory() . '/dist/.vite/manifest.json')
    // Default filters applied to every script / style asset.
    ->addScriptsFilter(ScriptFilter::create()->forFrontendLocation())
    // Per-entry filter, keyed by the manifest entry name.
    ->addScriptFilter('resources/main.ts', ScriptFilter::create()->withDependencies('jquery'))
    // Vite dev-server connection used for hot-reload detection.
    ->setViteServerHost('localhost')
    ->setViteServerPort(5173)
    ->enableAutoLoad();

return [
    'vite' => $vite->toArray(),
    'hook' => [
        'provider' => [
            \Kaiseki\WordPress\Vite\OutputFilterRegistry::class,
            \Kaiseki\WordPress\Vite\ViteAssetManager::class,
            \Kaiseki\WordPress\Vite\ViteClientScriptRenderer::class,
        ],
    ],
];
```

`ConfigProvider::__invoke()` ships sensible defaults (an empty `vite` config plus the dependency aliases and factories) — merge it into your aggregator so the providers resolve from the container. Each asset is loaded from the Vite dev server when it is reachable, and falls back to the built file URL otherwise.

Development
-----------

[](#development)

```
composer install
composer check   # check-deps, cs-check, phpstan
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c3a6b11aea9668c9e9ca0c0f8515ef114d344acb552c695d715d35d5b388ea4?d=identicon)[woda](/maintainers/woda)

---

Top Contributors

[![davidmondok](https://avatars.githubusercontent.com/u/3883758?v=4)](https://github.com/davidmondok "davidmondok (38 commits)")[![wolfgangschaefer](https://avatars.githubusercontent.com/u/26325205?v=4)](https://github.com/wolfgangschaefer "wolfgangschaefer (6 commits)")[![developeratexample](https://avatars.githubusercontent.com/u/14004359?v=4)](https://github.com/developeratexample "developeratexample (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kaiseki-wp-vite/health.svg)

```
[![Health](https://phpackages.com/badges/kaiseki-wp-vite/health.svg)](https://phpackages.com/packages/kaiseki-wp-vite)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.5k](/packages/laravel-framework)[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k464.3M10.6k](/packages/symfony-dependency-injection)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[spatie/flare-client-php

Send PHP errors to Flare

178166.2M24](/packages/spatie-flare-client-php)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
