module LuckyVite::Tags
Direct including types
Defined in:
lucky_vite/tags.crConstant Summary
-
SERVED_BY_VITE =
["js", "jsx", "ts", "tsx", "css", "scss", "less"] of ::String
Macro Summary
-
asset(entry)
Loads an asset from the vite server in development or as a static file in production.
-
dynamic_asset(entry)
Loads an asset, without checking it's existance in the manifest, from the vite server in development or as a static file in production.
-
vite_css_link(entry, **options)
Generates a stylesheet link tag for the given entrypoint.
-
vite_entry_tags(entry, **options)
A one-stop shop for all your vite tags in development and production.
-
vite_js_link(entry, **options)
Generates a script tag for the given entrypoint.
Instance Method Summary
-
#vite_client_tag(**options)
Renders the Vite client to enable Hot Module Reload in development.
-
#vite_react_refresh_tag(**options)
Loads
/@react-refresh
from the vite server and renders a script tag with the refresh hook.
Macro Detail
Loads an asset from the vite server in development or as a static file in production.
Loads an asset, without checking it's existance in the manifest, from the vite server in development or as a static file in production.
Generates a stylesheet link tag for the given entrypoint.
Additional tag attributes can be passed in as named arguments.
A one-stop shop for all your vite tags in development and production.
Additional tag attributes can be passed in as named arguments.
Note: in development this method connects with the vite server; in other environments it loads compiled files from the manifest.
Generates a script tag for the given entrypoint.
Additional tag attributes can be passed in as named arguments.
Instance Method Detail
Renders the Vite client to enable Hot Module Reload in development.
Loads /@react-refresh
from the vite server and renders a script tag with
the refresh hook.
# In a page or component:
vite_react_refresh_tag
Only use this tag with @vitejs/plugin-react
.