class ViteMapper implements Mapper

Maps asset references to Vite-generated files using a Vite manifest.json.

Supports both development mode (Vite dev server) and production mode.

Methods

__construct(string $baseUrl, string $basePath, string|null $manifestPath = null, string|null $devServer = null, Mapper|null $publicMapper = null)

No description

getAsset(string $reference, array $options = [])

Returns an Asset for the given Vite entry point or public directory file.

string
getBaseUrl()

No description

string
getBasePath()

No description

Details

at line 23
__construct(string $baseUrl, string $basePath, string|null $manifestPath = null, string|null $devServer = null, Mapper|null $publicMapper = null)

No description

Parameters

string $baseUrl
string $basePath
string|null $manifestPath
string|null $devServer
Mapper|null $publicMapper

at line 40
Asset getAsset(string $reference, array $options = [])

Returns an Asset for the given Vite entry point or public directory file.

Parameters

string $reference
array $options

mapper-specific options

Return Value

Asset

Exceptions

AssetNotFoundException

at line 152
string getBaseUrl()

No description

Return Value

string

at line 158
string getBasePath()

No description

Return Value

string