uupvite/vite-assets-loader

Installs: 141

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/uupvite/vite-assets-loader

v1.0.2 2024-04-11 14:30 UTC

This package is not auto-updated.

Last update: 2025-12-18 22:52:29 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
);