Documenting __VITE_ASSET__
or exposing a function to build asset url.
#13459
Labels
enhancement
New feature or request
Documentation is
Explain in Detail
Currently in plugin development, if you want to emit a file and then reference it, you need to use the
__VITE_ASSET__${fileHandle}__
pattern to get the url , there are many examples like this, such as imagetools.The problem is : this pattern is undocumented, and subsequent plugin developers need to view the source code to continue development.
Your Suggestion for Changes
buildAssetUrl
: The function receives fileHandle as an argument and returns the corresponding asset url.Reproduction
No response
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: