uupvite / vite-assets-loader
v1.0.2
2024-04-11 14:30 UTC
This package is not auto-updated.
Last update: 2025-04-24 19:25:52 UTC
README
UupVite (double-U P vite) provides a simple API to enqueue assets that were bundled through vite with the corresponding vite plugin.
$asset_loader = new \UupVite\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
);