Skip to content

Commit cf840e3

Browse files
committed
perf: image compression configuration optimization
1 parent 82eb72b commit cf840e3

File tree

3 files changed

+124
-157
lines changed

3 files changed

+124
-157
lines changed

build/vite/plugin/imagemin.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function configImageminPlugin() {
1313
optimizationLevel: 7,
1414
},
1515
mozjpeg: {
16-
quality: 8,
16+
quality: 20,
1717
},
1818
pngquant: {
1919
quality: [0.8, 0.9],
@@ -22,10 +22,11 @@ export function configImageminPlugin() {
2222
svgo: {
2323
plugins: [
2424
{
25-
removeViewBox: false,
25+
name: 'removeViewBox',
2626
},
2727
{
28-
removeEmptyAttrs: false,
28+
name: 'removeEmptyAttrs',
29+
active: false,
2930
},
3031
],
3132
},

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@iconify/iconify": "^2.0.3",
3737
"@logicflow/core": "^0.5.0",
3838
"@logicflow/extension": "^0.5.0",
39-
"@vueuse/core": "^5.0.3",
39+
"@vueuse/core": "^5.1.0",
4040
"@zxcvbn-ts/core": "^1.0.0-beta.0",
4141
"ant-design-vue": "2.2.0-rc.1",
4242
"axios": "^0.21.1",
@@ -53,7 +53,7 @@
5353
"print-js": "^1.6.0",
5454
"qrcode": "^1.4.4",
5555
"resize-observer-polyfill": "^1.5.1",
56-
"sortablejs": "^1.13.0",
56+
"sortablejs": "^1.14.0",
5757
"tinymce": "^5.8.2",
5858
"vditor": "^3.8.5",
5959
"vue": "3.1.4",
@@ -66,7 +66,7 @@
6666
"devDependencies": {
6767
"@commitlint/cli": "^12.1.4",
6868
"@commitlint/config-conventional": "^12.1.4",
69-
"@iconify/json": "^1.1.369",
69+
"@iconify/json": "^1.1.370",
7070
"@purge-icons/generated": "^0.7.0",
7171
"@types/codemirror": "^5.60.1",
7272
"@types/crypto-js": "^4.0.1",
@@ -123,10 +123,10 @@
123123
"ts-node": "^10.0.0",
124124
"typescript": "4.3.5",
125125
"vite": "2.4.0-beta.2",
126-
"vite-plugin-compression": "^0.2.5",
126+
"vite-plugin-compression": "^0.3.0",
127127
"vite-plugin-html": "^2.0.7",
128-
"vite-plugin-imagemin": "^0.3.2",
129-
"vite-plugin-mock": "^2.8.0",
128+
"vite-plugin-imagemin": "^0.4.0",
129+
"vite-plugin-mock": "^2.9.0",
130130
"vite-plugin-purge-icons": "^0.7.0",
131131
"vite-plugin-pwa": "^0.8.1",
132132
"vite-plugin-style-import": "^1.0.1",

0 commit comments

Comments
 (0)