mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Don't optimzie colors
This commit is contained in:
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user