ViteManifest
API reference › Debug Core › Panel › Asset › ViteManifest
Typed snapshot of the Vite bridge configuration and its build manifest.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$baseUrl readonly constructor | string | Public base URL the built assets are served from. | ViteManifest |
$chunks readonly constructor | list<ViteChunk> | Build chunks in the manifest. | ViteManifest |
$devMode readonly constructor | bool | Whether the bridge serves assets from the Vite dev server instead of the build manifest. | ViteManifest |
$devServerUrl readonly constructor | string| | Dev server URL, or null when the bridge serves built assets. | ViteManifest |
$manifestPath readonly constructor | string | Filesystem path of the build manifest the bridge reads. | ViteManifest |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a Vite snapshot from bridge settings and build chunks. | ViteManifest |
fromArray() static | Narrows the persisted Vite payload into a typed manifest. | ViteManifest |
jsonSerialize() | Returns the typed manifest for JSON serialization. | ViteManifest |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $baseUrl, bool $devMode, string|null $devServerUrl, string $manifestPath, list<PHPForge\Debug\Panel\Asset\ViteChunk> $chunks)Creates a Vite snapshot from bridge settings and build chunks.
Parameters
| Parameter | Type | Description |
|---|---|---|
$baseUrl | string | |
$devMode | bool | |
$devServerUrl | string| | |
$manifestPath | string | |
$chunks | list<ViteChunk> | Build chunks in the manifest. |
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path): selfNarrows the persisted Vite payload into a typed manifest.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Persisted manifest, expected to be an object carrying the declared shape. |
$path | string | JSON path of the manifest, used to report a malformed payload. |
Returns
self: Manifest carrying the bridge configuration and its build chunks.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the typed manifest for JSON serialization.
Returns
array<string, mixed>