bohnmedia/contao-vite-bundle
最新稳定版本:v1.3.0
Composer 安装命令:
composer require bohnmedia/contao-vite-bundle
包简介
Vite Bundle for Contao 5
README 文档
README
A small Contao 5 wrapper around pentatrion/vite-bundle. It
registers PentatrionViteBundle in Contao Manager Edition and exposes the
most common rendering helpers as Contao insert tags.
Installation
composer require bohn-media/contao-vite-bundle
The bundle expects Vite to output its build artifacts into public/build/
(the default).
Rendering entry tags
Render the link and script tags for a Vite entry.
Twig
{{ vite_entry_link_tags('app') }}
{{ vite_entry_script_tags('app') }}
Insert tag
{{vite_entry_link_tags::app}}
{{vite_entry_script_tags::app}}
If the entry name is missing or rendering fails (e.g. unknown entry,
broken entrypoints.json), the insert tags render as an empty string and
log an error instead of throwing.
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
{{ asset('@/images/favicon.svg', 'vite') }}
Insert tag
{{asset::@/images/favicon.svg::vite}}
License
MIT.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-01