ohseesoftware / laravel-vite-manifest
Simple Blade directive to include Vite files from a manifest.
Installs: 17 442
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 6
Open Issues: 3
Requires
- php: >7.1
- illuminate/support: >7.30
- laravel/framework: >7.30
Requires (Dev)
README
Overview
The Laravel Vite Manifest package adds a Blade directive to include Vite's JS and CSS output files, pulled from the generated manifest file. The main logic of this package was sourced from https://github.com/andrefelipe/vite-php-setup.
Usage
composer require ohseesoftware/laravel-vite-manifest
Add the @vite
directive where you want to include the JS and CSS files:
// app.blade.php
@vite
By default, the directive will attempt to include the js/app.js
file. However, if you have a different entrypoint file, you can pass that into the directive:
// app.blade.php
@vite(js/main.js)
It is recommended you include your source .css
files from within your source js/app.js
file. This will allow Vite to include it as a dependency.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@ohseesoftware.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.