feat: 通过 svgo 自动移除 svg fill 属性
This commit is contained in:
parent
23f5dc9c14
commit
8dec01f011
@ -92,7 +92,19 @@ export default defineConfig(({ mode }) => {
|
|||||||
// 生成 SVG 雪碧图
|
// 生成 SVG 雪碧图
|
||||||
createSvgIconsPlugin({
|
createSvgIconsPlugin({
|
||||||
iconDirs: [resolve(root, "src/assets/icons")],
|
iconDirs: [resolve(root, "src/assets/icons")],
|
||||||
symbolId: "icon-[dir]-[name]"
|
symbolId: "icon-[dir]-[name]",
|
||||||
|
// 自定义 SVGO 配置
|
||||||
|
svgoOptions: {
|
||||||
|
plugins: [
|
||||||
|
// 移除 fill 属性
|
||||||
|
{
|
||||||
|
name: "removeAttrs",
|
||||||
|
params: {
|
||||||
|
attrs: "fill"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
// 原子化 CSS
|
// 原子化 CSS
|
||||||
UnoCSS()
|
UnoCSS()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user