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 ViteConfig;
class Vite extends ViteConfig
{
public array $routesAssets = [
[
'routes' => ['*'],
'assets' => ['styles/index.css'],
],
];
}
public array $routesAssets = [
[
'routes' => ['*'], //
// 'routes' => ['admin*'], // only
ini
VITE_ENVIRONMENT="production"
VITE_SERVER_HOST="localhost"
VITE_SERVER_PORT=5173
VITE_SERVER_ORIGIN="http://localhost:5173"
VITE_RESOURCES_DIR="app/Resources"
VITE_ASSETS_DIR="assets"
VITE_MANIFEST=".vite/manifest.json"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.