PHP code example of 2crt / uup-assets-loader
1. Go to this page and download the library: Download 2crt/uup-assets-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/ */
2crt / uup-assets-loader example snippets
$asset_loader = new \Uup\ViteAssetsLoader(
__DIR__ . '/dist/manifest.json',
get_template_directory_uri() . '/dist/manifest.json'
);
$asset_loader->enqueue_script(
'theme-js', // handle
'js/main.js' // source file
);
$asset_loader->enqueue_style(
'theme-styles', // handle
'resources/css/theme.scss' // source file
);