Skip to content

View Helpers

viteAsset()

viteAsset() — returns string

Available in: controller Category: Asset Functions

Returns the resolved URL for a Vite entrypoint. In production, reads the Vite manifest to return the fingerprinted asset path. In development, returns the Vite dev server URL.

NameTypeRequiredDefaultDescription
entrypointstringyesThe source entrypoint path as defined in your Vite config (e.g. “src/main.js”).