1. Go to this page and download the library: Download vernok/vite-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Vernok\Vite\Classes\Traits\HasViteAssets;
class BlogList extends ComponentBase
{
use HasViteAssets;
public function onRun(): void
{
$this->addViteAssets(['resources/modules/blog/entrypoint.ts']);
// Or explicit scope:
// $this->addViteAssets([...], 'plugin', 'Acme.Blog');
}
}
Event::listen('cms.page.init', function ($controller) {
$controller->addJs('vite:resources/modules/analytics/entrypoint.ts');
});
bash
composer october:up
bash
php artisan plugin:install Vernok.Vite
bash
php artisan plugin:test Vernok.Vite
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.