class

ViteRuby::Manifest

Inherits Reference < Object

Порт ViteRuby::Manifest (production-режим, без auto_build).

Constructors

instance
Source

Class methods

entrypoints_dir
Source
entrypoints_dir=(entrypoints_dir : String)
Source
path

public/vite/.vite/manifest.json — дефолт vite build (vite 5/6).

Source
path=(path : String)

public/vite/.vite/manifest.json — дефолт vite build (vite 5/6).

Source
public_output_dir
Source
public_output_dir=(public_output_dir : String)
Source
reset

Тесты/консоль подменяют путь и сбрасывают кэш.

Source

Instance methods

entries
lookup(name : String, type : String | Nil = nil) : Entry | Nil
Source
lookup!(name : String, type : String | Nil = nil) : Entry
Source
path_for(name : String, type : String | Nil = nil) : String

path_for("application", type: :javascript) → "/vite/assets/x-hash.js"

Source
react_preamble_code

React Refresh preamble (react_preamble_code гема, байты из оракула dev_react_preamble_code).

Source
resolve_entries(names : Array(String)) : NamedTuple(scripts: Array(String), imports: Array(String), stylesheets: Array(String))

resolve_entries: scripts / modulepreload-импорты / css-чанки. В dev импортов и стилей нет — их резолвит браузер через dev-сервер (find_manifest_entry/react-preamble из гема).

Source
resolve_entry_name(name : String, type : String | Nil) : String

resolve_entry_name используется и для текста ошибки отсутствия.

Source
vite_client_src

Путь HMR-клиента (vite_client_src гема): prefix_asset_with_host = File.join("/", public_output_dir, "@vite/client") — с того же origin, через прокси (skip_proxy не поддержан).

Source

Nested types