import { defineConfig } from "vite"; import solid from "solid-start"; import Icons from "unplugin-icons/vite"; import { promises as fs } from "fs"; const cleanSvg = (svgString: string) => { const foundSvgs = new RegExp("^[\\s\\S]*( fs.readFile("./assets/icon-path.svg", "utf-8").then(cleanSvg), "lufrai-logo": () => fs .readFile("./assets/lufrai/logo-current.svg", "utf-8") .then(cleanSvg), "lufrai-logo-www": () => fs .readFile("./assets/lufrai/logo-www-current.svg", "utf-8") .then(cleanSvg), }, }, iconCustomizer(collection, icon, props) { if (collection !== "custom") { return; } // TODO: Icons should be coded like this: but this results in a rendering issue: // Discussion: https://discord.com/channels/722131463138705510/722167424186843267/989162440342241281 // Workaround: We manually set width/height = 100% and override width css classes props.width = "100%"; props.height = "100%"; }, }), solid(), ], });