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 = [])

Retrieves an Asset for a given Vite entry point.

string
getBaseUrl()

Returns the base URL for this mapper.

string
getBasePath()

Returns the base path for this mapper.

Details

at line 21
__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 38
Asset getAsset(string $reference, array $options = [])

Retrieves an Asset for a given Vite entry point.

Parameters

string $reference
array $options

Return Value

Asset

Exceptions

AssetNotFoundException

at line 139
string getBaseUrl()

Returns the base URL for this mapper.

Return Value

string

at line 148
string getBasePath()

Returns the base path for this mapper.

Return Value

string