pentatrion / vite-bundle
Vite integration for your Symfony app
Installs: 372 727
Dependents: 6
Suggesters: 0
Security: 0
Stars: 197
Watchers: 9
Forks: 21
Open Issues: 3
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
- 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-04-20 19:26:07 UTC
README
ViteBundle : Symfony integration with Vite
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.
⚠️ 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.
If you want to view the source code or open issues you are in the right place.
If you want to contribute, make PRs or consult examples you will have to go to the symfony-vite-dev repository.
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
Package | Description |
---|---|
vite-bundle | Symfony Bundle (read-only) |
vite-plugin-symfony | Vite plugin (read-only) |
symfony-vite-dev | Package for contributors |
License
MIT.