You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
566 B
20 lines
566 B
7 years ago
|
'use strict'; // eslint-disable-line
|
||
|
|
||
|
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
|
||
|
const imageminMozjpeg = require('imagemin-mozjpeg');
|
||
|
|
||
|
const config = require('./config');
|
||
|
|
||
|
module.exports = {
|
||
|
plugins: [
|
||
|
new ImageminPlugin({
|
||
|
optipng: { optimizationLevel: 7 },
|
||
|
gifsicle: { optimizationLevel: 3 },
|
||
|
pngquant: { quality: '65-90', speed: 4 },
|
||
|
svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
|
||
|
plugins: [imageminMozjpeg({ quality: 75 })],
|
||
|
disable: (config.enabled.watcher),
|
||
|
}),
|
||
|
],
|
||
|
};
|