module

ActionView::Helpers::ViteHelper

Instance methods

vite_asset_path(name : String, type : String | Nil = nil) : String

vite_asset_path "application" (type: :javascript|:stylesheet)

Source
vite_asset_url(name : String, type : String | Nil = nil) : String
Source
vite_client_tag(crossorigin : String = "anonymous") : SafeString | Nil

HMR-клиент: '<script src="/vite/@vite/client" ...>' — только с dev-сервером (оракул dev_client_tag, байты javascript_include_tag: src/crossorigin/type).

Source
vite_image_tag(name : String, **opts) : SafeString
Source
vite_javascript_tag(*names : String, type : String = "module", skip_preload_tags : Bool = false, skip_style_tags : Bool = false, crossorigin : String = "anonymous", media : String = "screen") : SafeString

vite_javascript_tag "application", "second" — script-теги (ESM), modulepreload для чанков-импортов и stylesheet для css-чанков.

Source
vite_react_refresh_tag

React Refresh (оракул dev_react_refresh_tag): javascript_tag с CDATA-обёрткой; nonce: true гема — без CSP-контроллера даёт nil, атрибут не ставится.

Source
vite_stylesheet_tag(*names : String, **opts) : SafeString
Source
vite_typescript_tag(*names : String) : SafeString
Source