Use image-webpack-loader for image optimization.
parent
493cad28d3
commit
c8a9204103
File diff suppressed because one or more lines are too long
|
@ -48,6 +48,7 @@
|
|||
"execa": "^0.10.0",
|
||||
"file-loader": "^1.1.11",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"image-webpack-loader": "^4.3.1",
|
||||
"jimp": "^0.2.28",
|
||||
"mini-css-extract-plugin": "^0.4.1",
|
||||
"node-sass": "^4.9.2",
|
||||
|
|
|
@ -201,6 +201,29 @@ export default (options, { mode }) => {
|
|||
// fallback: 'responsive-loader',
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'image-webpack-loader',
|
||||
options: {
|
||||
mozjpeg: {
|
||||
progressive: true,
|
||||
quality: 80,
|
||||
},
|
||||
optipng: {
|
||||
enabled: true,
|
||||
optimizationLevel: 7,
|
||||
},
|
||||
pngquant: {
|
||||
enabled: false,
|
||||
quality: '65-85',
|
||||
speed: 2,
|
||||
strip: true,
|
||||
},
|
||||
gifsicle: {
|
||||
interlaced: false,
|
||||
},
|
||||
disable: development,
|
||||
},
|
||||
},
|
||||
],
|
||||
})),
|
||||
|
||||
|
|
Loading…
Reference in New Issue