vite()
helper method
Laravel
A super simple Laravel helper to fill the void that Laravel Mix left. Mix had a helper, aptly named mix()
that would return an absolute URL to the mix resource. With the introduction of Vite (as of Laravel 9.19), there is no equivalent for Vite, at least, until now.
This was originally submitted as a PR to the core Laravel framework, but unfortunately wasn't deemed as a necessary addition.
Installation
You can install the package via composer:
composer require motomedialab/laravel-vite-helper
Usage
The usage for this helper is extremely simple, and directly replaces Laravel's mix()
helper.
// will return the compiled asset path for 'resources/css/app.css'
vite('resources/css/app.css');
Testing
composer test
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 [email protected] 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.