Skip to content

View Helpers

viteStyleTag()

viteStyleTag() — returns string

Available in: controller Category: Asset Functions

Returns a tag for a Vite CSS entrypoint. In development, Vite injects CSS via the JS client so this returns an empty string. In production, resolves the fingerprinted path.

NameTypeRequiredDefaultDescription
entrypointstringyesThe source CSS entrypoint path (e.g. “src/main.css”).
headbooleannofalseSet to true to place output in the <head> area instead of inline.