PHPackages                             bohnmedia/contao-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. [Templating &amp; Views](/categories/templating)
4. /
5. bohnmedia/contao-vite-bundle

ActiveContao-bundle[Templating &amp; Views](/categories/templating)

bohnmedia/contao-vite-bundle
============================

Integrates pentatrion/vite-bundle into Contao 5 and exposes Vite entry tags and asset URLs via both Twig functions and insert tags.

v1.3.1(2mo ago)09MITPHPPHP ^8.2

Since Apr 25Pushed 2mo agoCompare

[ Source](https://github.com/bohnmedia/contao-vite-bundle)[ Packagist](https://packagist.org/packages/bohnmedia/contao-vite-bundle)[ RSS](/packages/bohnmedia-contao-vite-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (7)Versions (8)Used By (0)

Contao Vite Bundle
==================

[](#contao-vite-bundle)

A small Contao 5 wrapper around [pentatrion/vite-bundle](https://github.com/lhapaipai/vite-bundle). It registers `PentatrionViteBundle` in Contao Manager Edition so its Twig functions work out of the box, and additionally exposes the most common rendering helpers as Contao insert tags for use outside of templates.

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

[](#installation)

```
composer require bohnmedia/contao-vite-bundle
```

By default the bundle expects Vite to output its build artifacts into `public/build/`. Both parts of that path can be overridden through the underlying `pentatrion_vite` configuration:

```
# config/config.yaml
pentatrion_vite:
    public_directory: public   # default: public
    build_directory: build     # default: build
```

See the [pentatrion/vite-bundle reference](https://symfony-vite.pentatrion.com/reference/vite-bundle.html) for all available configuration options.

Rendering entry tags
--------------------

[](#rendering-entry-tags)

Render the link and script tags for a Vite entry.

### Twig

[](#twig)

```
{{ vite_entry_link_tags('app') }}
{{ vite_entry_script_tags('app') }}
```

### Insert tag

[](#insert-tag)

```
{{vite_entry_link_tags::app}}
{{vite_entry_script_tags::app}}

```

The insert tags behave like the Twig functions they wrap: an unknown entry resolves to an empty string by default, unless you enable `throw_on_missing_entry` in the configuration.

Resolving individual asset URLs
-------------------------------

[](#resolving-individual-asset-urls)

A named asset package `vite` is registered automatically, so Vite-hashed assets resolve via Symfony's `asset()` function or Contao's `{{asset::}}`insert tag.

### Twig

[](#twig-1)

```
{{ asset('@/images/favicon.svg', 'vite') }}
```

### Insert tag

[](#insert-tag-1)

```
{{asset::@/images/favicon.svg::vite}}

```

License
-------

[](#license)

MIT.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance87

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

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

Total

7

Last Release

64d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9419148?v=4)[bohn.media](/maintainers/bohnmedia)[@bohnmedia](https://github.com/bohnmedia)

---

Top Contributors

[![dennisbohn](https://avatars.githubusercontent.com/u/87128053?v=4)](https://github.com/dennisbohn "dennisbohn (13 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bohnmedia-contao-vite-bundle/health.svg)

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

###  Alternatives

[contao/manager-bundle

Provides the Contao Managed Edition

181.3M77](/packages/contao-manager-bundle)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k92](/packages/contao-community-alliance-dc-general)

PHPackages © 2026

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