pentatrion / vite-bundle
Vite integration for your Symfony app
Installs: 728 534
Dependents: 10
Suggesters: 0
Security: 0
Stars: 231
Watchers: 9
Forks: 24
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.0
- symfony/asset: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/config: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/dependency-injection: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/framework-bundle: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/http-client: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/http-kernel: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/twig-bundle: ^4.4 || ^5.0 || ^6.0 || ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.9
- phpstan/phpstan: ^1.8
- phpstan/phpstan-symfony: ^1.3
- phpunit/phpunit: ^9.5
- symfony/phpunit-bridge: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/web-link: ^4.4 || ^5.0 || ^6.0 || ^7.0
- dev-main
- v7.0.5
- v7.0.4
- v7.0.3
- v7.0.2
- v7.0.1
- v7.0.0
- v6.5.3
- v6.5.2
- v6.5.1
- v6.5.0
- v6.4.7
- v6.4.6
- v6.4.5
- v6.4.4
- v6.4.3
- v6.4.2
- v6.4.1
- v6.4.0
- v6.3.6
- v6.3.5
- v6.3.4
- v6.3.3
- v6.3.2
- v6.3.1
- v6.3.0
- v6.2.0
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1.0
- v6.0.1
- v6.0.0
- v5.0.1
- v5.0.0
- v4.3.0
- v4.2.1
- v4.2.0
- v4.1.0
- v4.0.2
- v4.0.1
- v4.0.0
- v3.3.1
- v3.3.0
- v3.2.0
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.0
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.0
- v2.0.0-alpha
- v1.2.0
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- v0.2.1
- v0.2.0
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
This package is auto-updated.
Last update: 2024-11-21 19:47:20 UTC
README
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 %}
Ecosystem
License
MIT.