bloom-ux / vite-manifest
Get js and css dependencies from a vitejs manifest file
dev-main
2022-03-30 20:56 UTC
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-29 06:52:36 UTC
README
Get js and css dependencies from a vitejs manifest file
Usage
$manifest = new Bloom_UX\ViteManifest( $manifest_file_full_path ); $manifest->setBaseUrl( 'https://domain.tld/assets/dist' ); $dependencies = $manifest->getEntryDeps( 'main.js' ); foreach ( $dependencies as $dep ) { if ( $dep->isEntry() ) { // load as javascript module } else if ( $dep instanceof JsDependency ) { // load as js } else { // loas as css } }