Media / API
foldkit-media/vite
Icons as imports: import { arrowLeft } from 'virtual:foldkit-icons/lucide'
gives the icon's IconData, read from an Iconify set or a folder of the
application's own SVG files when the build reads the import. The import is
the selection, and the bundler drops what nothing imports. A declaration
file names every icon of every set, so a misspelt name is a type error.
Functions
exportName | arrow-left is arrowLeft, and 1-circle _1Circle; JavaScript's reserved words export as they are. |
icons | The plugin: give it the sets the application imports from. An SVG in a folder that the parser refuses fails the build, naming the file; an icon of an… |
images | The plugin: an import with ?image becomes the image's facts and a provider over its variants. sharp is read on the first such import, so an application that… |