{"version":3,"sources":["../../src/frameworks/astro.ts"],"names":["icons"],"mappings":";;;;;;;;;AAce,SAARA,OACN,SACmB;AACnB,SAAO;AAAA,IACN;AAAA,IACA,OAAO;AAAA,MACN,sBAAsB,CAAC,EAAE,aAAa,MAAM;AAC3C,qBAAa,EAAE,MAAM,EAAE,SAAS,CAAC,MAAK,OAAO,CAAC,EAAE,EAAE,CAAC;AAAA,MACpD;AAAA,IACD;AAAA,EACD;AACD","sourcesContent":["/* eslint-disable prefer-rest-params */\nimport type { IconPrerenderPluginOptions } from \"@/types\";\nimport { PLUGIN_NAME } from \"@/types\";\nimport type { AstroIntegration } from \"astro\";\nimport vite from \"./vite\";\n\n// TODO: Small bug: requires an initial reload on server startup (no cache) to show full page\n\nexport interface AstroIconPrerenderIntegrationOptions\n\textends IconPrerenderPluginOptions {}\n\n/**\n * Astro integration to replace icons with the actual SVG element at build time.\n */\nexport default function icons(\n\toptions?: AstroIconPrerenderIntegrationOptions\n): AstroIntegration {\n\treturn {\n\t\tname: PLUGIN_NAME,\n\t\thooks: {\n\t\t\t\"astro:config:setup\": ({ updateConfig }) => {\n\t\t\t\tupdateConfig({ vite: { plugins: [vite(options)] } });\n\t\t\t},\n\t\t},\n\t};\n}\n"]}