{"version":3,"sources":["../../src/frameworks/rollup.ts"],"names":[],"mappings":";;;;;;;;AAce,SAAR,MACN,SACS;AACT,MAAI;AAEJ,SAAO;AAAA,IACN;AAAA,IACA,YAAY,MAAM;AACjB,sBAAgB;AAAA,IACjB;AAAA,IACA,KAAK,IAAI;AACR,YAAM,SAAS,cAAc,OAAO;AACpC,aAAO,UAAU,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;AAAA,IAC5C;AAAA,EACD;AACD","sourcesContent":["import type { IconPrerenderPluginOptions } from \"@/types\";\nimport { PLUGIN_NAME } from \"@/types\";\nimport type { NormalizedOutputOptions, Plugin } from \"rollup\";\nimport { useLoader } from \"../loader/loader\";\n\nexport interface IconPrerenderPluginRollupOptions\n\textends IconPrerenderPluginOptions {}\n\n/**\n * Rollup plugin to replace icons with the actual SVG element at build time.\n *\n * @param options\n * @returns\n */\nexport default function icons(\n\toptions?: IconPrerenderPluginRollupOptions\n): Plugin {\n\tlet outputOptions: NormalizedOutputOptions;\n\n\treturn {\n\t\tname: PLUGIN_NAME,\n\t\trenderStart(opts) {\n\t\t\toutputOptions = opts;\n\t\t},\n\t\tload(id) {\n\t\t\tconst outDir = outputOptions.dir ?? \"dist\";\n\t\t\treturn useLoader(id, { outDir, ...options });\n\t\t},\n\t};\n}\n"]}