PHPackages                             webforge/symfony-vite-bundle - 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. webforge/symfony-vite-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

webforge/symfony-vite-bundle
============================

A symfony bundle to integrates vite js frontend builds.

1.1.0-beta1(8mo ago)01.8k↓75%1[2 issues](https://github.com/webforge-labs/symfony-vite-bundle/issues)MITPHPPHP &gt;=8.2

Since Feb 13Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/webforge-labs/symfony-vite-bundle)[ Packagist](https://packagist.org/packages/webforge/symfony-vite-bundle)[ RSS](/packages/webforge-symfony-vite-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (7)Versions (6)Used By (0)

symfony-vite-bundle
===================

[](#symfony-vite-bundle)

Integrate symfony with vite

installation
------------

[](#installation)

add

```
\Vite\WebforgeViteBundle::class => ['all' => true],

```

to your bundles.php

### environment variables

[](#environment-variables)

```
INTERNAL_WEB_ADDR='http://nginx'
VITE_DEV_SERVER=http://myapp.local.dev:3030
APP_CDN=

```

`VITE_DEV_SERVER` point this to the full url where your vite dev server runs (if you run `vite`). Your browser needs to have access to this url. `INTERNAL_WEB_ADDR` point this to your internal web server. Your PHP (container) needs to get access via this url to the files written by vite into the public folder.

`APP_CDN` special setup for production, if you use a cdn.

usage
-----

[](#usage)

Extend your base.html.twig with a template like this:

```
{% extends 'base.html.twig' %}

{% block title %}YAY Checkout{% endblock %}

{% block body %}

{% endblock %}

{% block stylesheets %}
    {{ vite_entry_link_tags('app') }}
{% endblock %}

{% block javascripts %}
    {{ vite_entry_script_tags('app') }}
{% endblock %}
```

Given that you have a `app.js` in `assets`, you can reference it in your vite config like this (see rollup options: input):

```
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueform from '@vueform/vueform/vite'
import tailwindcss from '@tailwindcss/vite'

// https://vite.dev/config/
export default defineConfig({
  plugins: [
      vue(),
      vueform(),
      tailwindcss(),
  ],
  server: {
    host: '0.0.0.0',
    port: 3000,
    origin: process.env.VITE_DEV_SERVER,
    cors: {
      "origin": "*"
    },
    allowedHosts: [
        'myapp.local.dev'
    ],
    watch: {
      // needed if you want to reload dev server with twig
      disableGlobbing: false,
    },
    hmr: {
      clientPort: 3030
    }
  },
  root: ".",
  base: '/build/',
  publicDir: false,
  build: {
    manifest: true,
    emptyOutDir: true,
    assetsDir: "",
    outDir: "public/build/",
    rollupOptions: {
      input: {
        app: "./assets/app.js"
      },
    },
  },
  resolve: {
    alias: {
      vue: 'vue/dist/vue.esm-bundler.js'
    }
  }
})
```

Adjust "allowedHosts", manually with the same domain you reference in `VITE_DEV_SERVER`.

Contribute
----------

[](#contribute)

Install casey/just

```
just up
```

```
prep
```

(runs phpunit, phpstan, everything you need to make a commit).

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance61

Regular maintenance activity

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

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 ~65 days

Total

5

Last Release

244d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc659f3d1fe2fd98e62c9ac16965126a8b2c7f3fe7fad3b7c6c5f548c46e0c27?d=identicon)[pscheit](/maintainers/pscheit)

---

Top Contributors

[![pscheit](https://avatars.githubusercontent.com/u/488189?v=4)](https://github.com/pscheit "pscheit (12 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webforge-symfony-vite-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/webforge-symfony-vite-bundle/health.svg)](https://phpackages.com/packages/webforge-symfony-vite-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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