File tree Expand file tree Collapse file tree 3 files changed +1176
-57
lines changed Expand file tree Collapse file tree 3 files changed +1176
-57
lines changed Original file line number Diff line number Diff line change 33
33
},
34
34
"dependencies" : {
35
35
"@preact/prerender-data-provider" : " ^0.0.1" ,
36
+ "imagemin-mozjpeg" : " ^8.0.0" ,
37
+ "imagemin-webpack-plugin" : " ^2.4.2" ,
36
38
"markdown-to-jsx" : " ^6.10.3" ,
37
39
"preact" : " ^10.0.0" ,
38
40
"preact-cli-plugin-netlify" : " ^1.5.0" ,
Original file line number Diff line number Diff line change 1
1
const netlifyPlugin = require ( 'preact-cli-plugin-netlify' ) ;
2
+ const ImageminPlugin = require ( 'imagemin-webpack-plugin' ) . default ;
3
+ const imageminMozjpeg = require ( 'imagemin-mozjpeg' ) ;
2
4
3
5
module . exports = ( config ) => {
4
6
netlifyPlugin ( config ) ;
7
+ config . plugins . push ( new ImageminPlugin ( {
8
+ from : './build/assets/**' ,
9
+ pngquant : {
10
+ quality : '60'
11
+ } ,
12
+ plugins : [
13
+ imageminMozjpeg ( {
14
+ quality : 50 ,
15
+ progressive : true
16
+ } )
17
+ ]
18
+ } ) ) ;
5
19
return config ;
6
20
} ;
You can’t perform that action at this time.
0 commit comments