2crt/uup-assets-loader

Installs: 201

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/2crt/uup-assets-loader

v1.0.6 2024-12-19 10:12 UTC

This package is auto-updated.

Last update: 2026-01-19 12:33:28 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 \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
);