UNPKG

vite-plugin-material-symbols

Version:

Selective loading of Material Symbols for production

30 lines (29 loc) 927 B
import { Plugin } from "vite"; //#region src/index.d.ts type PluginOptions = { /** * Material Symbols CSS Provider. Default: outlined, no infill, 24px, weight 400 * @see https://fonts.google.com/icons?icon.set=Material+Symbols * @default () => `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined...&${iconNamesParam}` * */ getUrl: (iconNamesParam: string) => string; /** * The name of JSX component to obtain the icon names from * @default Icon * */ component: string; /** * Enables higher priority for loading symbols * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preconnect * @default false */ preload: boolean; }; declare const plugin: ({ component, getUrl, preload }?: Partial<PluginOptions>) => Plugin; //#endregion export { plugin as default };