1
0
mirror of https://github.com/vector-im/hydrogen-web.git synced 2025-01-11 04:27:40 +01:00

Don't optimzie colors

This commit is contained in:
RMidhunSuresh 2022-07-15 14:59:50 +05:30
parent 5ba74b1d75
commit f7b302d34f

@ -57,7 +57,16 @@ async function generateIconSourceMap(icons, manifestLocation) {
const resolvedLocation = path.resolve(__dirname, "../../", manifestLocation, location); const resolvedLocation = path.resolve(__dirname, "../../", manifestLocation, location);
const iconData = await fs.readFile(resolvedLocation); const iconData = await fs.readFile(resolvedLocation);
const svgString = iconData.toString(); const svgString = iconData.toString();
const result = optimize(svgString); const result = optimize(svgString, {
plugins: [
{
name: "preset-default",
params: {
overrides: { convertColors: false, },
},
},
],
});
const optimizedSvgString = result.data; const optimizedSvgString = result.data;
const fileName = path.basename(resolvedLocation); const fileName = path.basename(resolvedLocation);
sources[fileName] = optimizedSvgString; sources[fileName] = optimizedSvgString;