定制 pentatrion/vite-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pentatrion/vite-bundle

最新稳定版本:v8.2.3

Composer 安装命令:

composer require pentatrion/vite-bundle

包简介

Vite integration for your Symfony app

README 文档

README

Symfony logo

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.

统计信息

  • 总下载量: 4.13M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 274
  • 点击次数: 1
  • 依赖项目数: 14
  • 推荐数: 0

GitHub 信息

  • Stars: 271
  • Watchers: 12
  • Forks: 27
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04