# frozen_string_literal: true # Public: Allows to render HTML tags for scripts and styles processed by Vite. module ViteRails::Helper # Public: Returns the current Vite Rails instance. def current_vite_instance ViteRails.instance end # Public: Computes the relative path for the specified given Vite asset. # # Example: # <%= vite_asset_path 'calendar.css' %> # => "/vite/assets/calendar-1016838bab065ae1e122.css" def vite_asset_path(name, **options) current_vite_instance.manifest.lookup!(name, **options) end # Public: Renders a