Skip to content

Commit

Permalink
perf: image compression configuration optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Jul 5, 2021
1 parent 82eb72b commit cf840e3
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 157 deletions.
7 changes: 4 additions & 3 deletions build/vite/plugin/imagemin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function configImageminPlugin() {
optimizationLevel: 7,
},
mozjpeg: {
quality: 8,
quality: 20,
},
pngquant: {
quality: [0.8, 0.9],
Expand All @@ -22,10 +22,11 @@ export function configImageminPlugin() {
svgo: {
plugins: [
{
removeViewBox: false,
name: 'removeViewBox',
},
{
removeEmptyAttrs: false,
name: 'removeEmptyAttrs',
active: false,
},
],
},
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@iconify/iconify": "^2.0.3",
"@logicflow/core": "^0.5.0",
"@logicflow/extension": "^0.5.0",
"@vueuse/core": "^5.0.3",
"@vueuse/core": "^5.1.0",
"@zxcvbn-ts/core": "^1.0.0-beta.0",
"ant-design-vue": "2.2.0-rc.1",
"axios": "^0.21.1",
Expand All @@ -53,7 +53,7 @@
"print-js": "^1.6.0",
"qrcode": "^1.4.4",
"resize-observer-polyfill": "^1.5.1",
"sortablejs": "^1.13.0",
"sortablejs": "^1.14.0",
"tinymce": "^5.8.2",
"vditor": "^3.8.5",
"vue": "3.1.4",
Expand All @@ -66,7 +66,7 @@
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@iconify/json": "^1.1.369",
"@iconify/json": "^1.1.370",
"@purge-icons/generated": "^0.7.0",
"@types/codemirror": "^5.60.1",
"@types/crypto-js": "^4.0.1",
Expand Down Expand Up @@ -123,10 +123,10 @@
"ts-node": "^10.0.0",
"typescript": "4.3.5",
"vite": "2.4.0-beta.2",
"vite-plugin-compression": "^0.2.5",
"vite-plugin-compression": "^0.3.0",
"vite-plugin-html": "^2.0.7",
"vite-plugin-imagemin": "^0.3.2",
"vite-plugin-mock": "^2.8.0",
"vite-plugin-imagemin": "^0.4.0",
"vite-plugin-mock": "^2.9.0",
"vite-plugin-purge-icons": "^0.7.0",
"vite-plugin-pwa": "^0.8.1",
"vite-plugin-style-import": "^1.0.1",
Expand Down
Loading

0 comments on commit cf840e3

Please sign in to comment.