pentatrion/vite-bundle

Vite integration for your Symfony app

Maintainers

👁 lhapaipai

Package info

github.com/lhapaipai/vite-bundle

Type:symfony-bundle

pkg:composer/pentatrion/vite-bundle

Statistics

Installs: 6 568 593

Dependents: 18

Suggesters: 1

Stars: 276

Open Issues: 0

v8.2.4 2026-03-22 11:41 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 80a5391af3a924597d65e7c81a4b28d212fea5fe

  • Hugues Tavernier <hugues.tavernier.woop@protonmail.com>

symfonybundlevitevitejs


README

👁 Symfony logo

👁 Image
👁 Image

ViteBundle : Symfony integration with Vite

Important

This repository is a "subtree split": a read-only subset of that main repository symfony-vite-dev which delivers to packagist only the necessary code.

Important

If you want to open issues, contribute, make PRs or consult examples you will have to go to the symfony-vite-dev repository.

This bundle helps you render all the dynamic script and link tags needed. Essentially, it provides two twig functions to load the correct scripts into your templates.

Installation

Install the bundle with:

composer require pentatrion/vite-bundle
npm install

# start your vite dev server
npm run dev

Add these twig functions in any template or base layout where you need to include a JavaScript entry:

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

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

 {# if you are using React, you have to replace with this #}
 {{ vite_entry_script_tags('app', { dependency: 'react' }) }}
{% endblock %}

Read the Docs to Learn More.

Ecosystem

Package Description
vite-plugin-symfony Vite plugin (read-only)
symfony-vite-dev Package for contributors

License

MIT.