PHPackages                             passchn/silverstripe-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. passchn/silverstripe-vite

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

passchn/silverstripe-vite
=========================

v0.2.5(3y ago)13241[2 issues](https://github.com/brandcom/silverstripe-vite/issues)MITPHPPHP ^7.4 || ^8.0

Since Jan 26Pushed 2y ago3 watchersCompare

[ Source](https://github.com/brandcom/silverstripe-vite)[ Packagist](https://packagist.org/packages/passchn/silverstripe-vite)[ RSS](/packages/passchn-silverstripe-vite/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (0)

Silverstripe Vite Plugin
========================

[](#silverstripe-vite-plugin)

Silverstripe Version support
----------------------------

[](#silverstripe-version-support)

- `^0.x` supports Silverstripe 4.x
- `dev-master` supports Silverstripe 5.x. Note: No stable release available yet, see [\#3](https://github.com/brandcom/silverstripe-vite/issues/3)

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

[](#installation)

```
composer require passchn/silverstripe-vite

```

In your `mysite.yml`:

```
Page:
  extensions:
    - ViteHelper\Vite\ViteDataExtension

```

Configuration
-------------

[](#configuration)

You can override the default config in your `mysite.yml`:

```
ViteHelper\Vite\ViteHelper:
  forceProductionMode: false
  devHostNeedle: '.test'
  devPort: 3000
  jsSrcDirectory: 'public_src/'
  mainJS: 'main.js'
  manifestDir: '/public/manifest.json'

```

*ViteHelper Config setting options:*

- If you set `forceProductionMode` to true, the build files (created after running `vite build`) will be served.
- Set the `devHostNeedle` to distinguish your live site from your local environment, e.g `localhost:8080`, `mysite.test` or `127.0.0.1`.
    - **Note:** The vite dev server must also be running.
- Set the `devPort` to the port of the vite dev server, e.g. `3000` – the vite port will be shown in the terminal when running the dev server. To set a fixed port (recommended), remember to also set it in the [vite config](https://github.com/brandcom/silverstripe-vite/wiki/example-vite-config) - under `server`. The port in both configs must always match.
- Define the `mainJS` entry point to where your applications script file is located.
    - E.g., if you use TypeScript, change the `mainJs` prop to `"main.ts"`.
- Define the `manifestDir` for where the manifest file will be located.

Usage
-----

[](#usage)

Insert JS / CSS tags in your main template, e.g., `Page.ss`:

```

    ...
    $Vite.HeaderTags.RAW

    ...
    $Vite.BodyTags.RAW

```

Vite config
-----------

[](#vite-config)

The config must match the `vite.config.js`. You need to **?flush** after making changes to yml configs.

Take a look at the [ViteHelper.php](https://github.com/passchn/silverstripe-vite/blob/master/src/Vite/ViteHelper.php) for more Information.

The config from your vite.config.js or vite.config.ts must match your ViteHelper config for this plugin.

See this [example vite.config.ts](https://github.com/brandcom/silverstripe-vite/wiki/example-vite-config) for default configuration.

**Note:** When using vite below `2.9.0`, the server config will be different. [See this config](https://github.com/brandcom/silverstripe-vite/wiki/example-vite-config#vite-below-290).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~32 days

Recently: every ~59 days

Total

10

Last Release

1335d ago

Major Versions

v0.2.5 → 4.x-dev2022-11-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77938819?v=4)[Pascal Schneider](/maintainers/passchn)[@passchn](https://github.com/passchn)

---

Top Contributors

[![passchn](https://avatars.githubusercontent.com/u/77938819?v=4)](https://github.com/passchn "passchn (20 commits)")

### Embed Badge

![Health badge](/badges/passchn-silverstripe-vite/health.svg)

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

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/sharedraftcontent

Share draft page content with non-CMS users

21424.1k12](/packages/silverstripe-sharedraftcontent)

PHPackages © 2026

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