Skip to content

Commit 2d2d055

Browse files
committed
perf: Enable more SVGO optimizations
1 parent 2212c21 commit 2d2d055

File tree

3 files changed

+205
-101
lines changed

3 files changed

+205
-101
lines changed

build-tools/tasks/generate-icons.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ function getIcon(iconName, content) {
3030
const { data } = Svgo.optimize(content, {
3131
plugins: [
3232
'preset-default',
33+
{
34+
name: 'removeViewBox',
35+
active: false,
36+
},
37+
{
38+
name: 'convertPathData',
39+
params: {
40+
floatPrecision: 3,
41+
transformPrecision: 3,
42+
removeUseless: true,
43+
straightCurves: true,
44+
lineShorthands: true,
45+
curveSmoothShorthands: true,
46+
},
47+
},
48+
'removeUselessDefs',
49+
'removeEmptyContainers',
3350
{
3451
name: 'awsuiValidateAttributes',
3552
type: 'visitor',

package-lock.json

Lines changed: 187 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)