PHP code example of ponponumi / vite-loader

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

    

ponponumi / vite-loader example snippets




use Ponponumi\ViteLoader\ViteLoader;



use Ponponumi\ViteLoader\ViteLoader;

$viteLoader = new ViteLoader(__DIR__ . "/build/.vite/manifest.json","http://localhost/build");
$viteLoader->devServerSetting(true,"http://vite:5173","http://localhost:5173");



use Ponponumi\ViteLoader\ViteLoader;

$viteLoader = new ViteLoader(__DIR__ . "/build/.vite/manifest.json","http://localhost/build");
$viteLoader->devServerSetting(true,"http://vite:5173","http://localhost:5173");

echo $viteLoader->htmlListGet([
    "assets/js/hello.js",
    "assets/scss/common.scss",
]);

// または
$viteLoader->htmlList([
    "assets/js/hello.js",
    "assets/scss/common.scss",
]);