This updates Autoprefixer to 7.1.1, and also moves the browser target list to package.json, in line with the recommendation made in this article (https://evilmartians.com/chronicles/autoprefixer-7-browserslist-2-released) from the developers of Autoprefixer and Browserslist.
30 lines
884 B
JavaScript
30 lines
884 B
JavaScript
'use strict'; // eslint-disable-line
|
|
|
|
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
|
|
const imageminMozjpeg = require('imagemin-mozjpeg');
|
|
const cssnano = require('cssnano');
|
|
|
|
const config = require('./config');
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
new OptimizeCssAssetsPlugin({
|
|
cssProcessor: cssnano,
|
|
cssProcessorOptions: {
|
|
discardComments: { removeAll: true },
|
|
autoprefixer: {},
|
|
},
|
|
canPrint: true,
|
|
}),
|
|
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),
|
|
}),
|
|
],
|
|
};
|