PHP code example of yassinedoghri / codeigniter-vite

1. Go to this page and download the library: Download yassinedoghri/codeigniter-vite 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/ */

    

yassinedoghri / codeigniter-vite example snippets


   
   // app/Config/Vite.php

   declare(strict_types=1);

   namespace Config;

   use CodeIgniterVite\Config\Vite as CodeIgniterViteConfig;

   class Vite extends CodeIgniterViteConfig
   {
      // ...
   }
   

public array $routesAssets = [
  [
    'routes' => ['*'], // 
    //   'routes' => ['admin*'], // only 

// app/Config/Vite.php

// ...
public string $serverOrigin = 'http://localhost:5173';

public string $resourcesDir = 'resources';

public string $assetsDir = 'assets';

public string $manifest = '.vite/manifest.json';

public string $manifestCacheName = 'vite-manifest';
// ...
sh
php spark vite:setup