PHP code example of trianayulianto / vite-codeigniter-4

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

    

trianayulianto / vite-codeigniter-4 example snippets


public $psr4 = [
    // others
    'Inertia'     => APPPATH . 'ThirdParty/vite-codeigniter-4/src'
];

...
    <!-- ViteJs Helper -->
    <?= vite('resources/js/app.js') 

...
    <!-- Given build path is relative to public path. -->
    <?= vite('resources/js/app.js', 'vendor/dist') 

...
    <!-- ViteJs Helper -->
    <?= vite_react_refresh()